[ale] Bellsouth Sendmail Fix

Stephen Touset stephen at touset.dyndns.org
Wed Jul 2 15:59:04 EDT 2003


Any way a Postfix user can do this?

Stephen Touset

Joe Steele wrote:

>On Wednesday, July 02, 2003 1:35 AM, Ryan Neily wrote:
>  
>
>>I tried this below, and it seems to work for me as well.  Anyone know why?
>>
>>    
>>
>
>Every time sendmail parses a recipient address, the end result is a 
>{MAILER, HOST, USER} 3-tuple.  The processing of the message is then 
>passed to the selected MAILER, along with the HOST and USER info.  If 
>the resulting MAILER is an '[IPC]' mailer (e.g., when the mailer is  
>'smtp' or 'relay'), then the HOST name has MX expansion performed via 
>DNS.  However, this MX expansion can be bypassed by putting square 
>brackets around the host name.
>
>All of the above is irrespective of whether a SMART_HOST is used, 
>because the sendmail program doesn't actually know anything about 
>SMART_HOSTs.  SMART_HOSTs are a feature of the m4 processing which 
>adds rulesets that end up putting the SMART_HOST name into the HOST 
>name which is passed to the MAILER.  Consequently, SMART_HOSTs are 
>subject to MX expansion just like any other host name.
>
>The Bellsouth server which you are using as a SMART_HOST 
>(mail.bellsouth.net) has the following MX records:
>
>mail.bellsouth.net      preference = 0, mail exchanger = mx01.mail.bellsouth.net
>mail.bellsouth.net      preference = 0, mail exchanger = mx00.mail.bellsouth.net
>
>So as a consequence of MX expansion, sendmail is attempting to relay 
>your mail to mx0[01].mail.bellsouth.net, rather than to 
>mail.bellsouth.net.  The problem is that mail.bellsouth.net is 
>configured to relay mail received from Bellsouth IP addresses, 
>whereas mx0[01].mail.bellsouth.net are configured to accept mail 
>addressed to Bellsouth customers but not to relay mail.
>
>As Jeff Brodnax has shown, using [mail.bellsouth.net] as the 
>SMART_HOST solves the problem by avoiding MX expansion so that 
>sendmail relays the mail directly to mail.bellsouth.net.
>
>Ryan Neily solved it in a more circuitous fashion by using port 
>forwarding and by using localhost as the SMART_HOST.  Sendmail thinks 
>it's relaying the mail to localhost, but in reality the connection is 
>forwarded to mail.bellsouth.net.
>
>--Joe
>
>
>
>  
>
>>On Wed, 2 Jul 2003, Ryan Neily wrote:
>>
>>    
>>
>>>So you're SMART_HOST line in your sendmail.mc file reads:
>>>
>>>define(`SMART_HOST', [mail.bellsouth.net])
>>>
>>>???
>>>
>>>On Wed, 2 Jul 2003, Jeff Brodnax wrote:
>>>
>>>      
>>>
>>>>On Tue, Jul 01, 2003 at 11:26:49PM -0400, Ryan Neily wrote:
>>>>        
>>>>
>>>>>If this gets posted, I've fixed the Bellsouth no-relay problem that people
>>>>>has been complaining about.  I used some of the tips of James CE Johnson
>>>>>which is using Postfix.  My solution is using Sendmail, but works much the
>>>>>same...
>>>>>
>>>>>I added a redirect rule to my IPtables firewall script that redirects any
>>>>>traffic coming from port 26 on the localhost interface to the bellsouth
>>>>>SMTP server on port 25.  I used this iptables command:
>>>>>
>>>>>$IPTABLES -t nat -A OUTPUT -p tcp -d 127.0.0.1 --dport 26 -j DNAT
>>>>>--to-destination 205.152.59.16:25
>>>>>
>>>>>and then added the following directives to my sendmail.mc, m4'd it to
>>>>>sendmail.cf and it seems to be working:
>>>>>          
>>>>>
>>>>Hi I am a lurker, just wanted to share the work around I found for the
>>>>no relaying by bellsouth.net.  I added brackets.. ie.
>>>>[mail.bellsouth.net] to my sendmail.mc as the smart host.  I have no
>>>>idea what this does, other than it doesn't use the mx anymore just right
>>>>through the main smtp server.   Relaying works again.
>>>>        
>>>>
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>  
>


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list