Sendmail Smart Relay Configuring
Lovell Mcilwain
lovell.mcilwain at gmail.com
Wed Feb 15 00:08:56 UTC 2006
Alexander Dalloz wrote:
> Am Di, den 14.02.2006 schrieb Lovell Mcilwain um 4:50:
>
>
>>> How do you try to generate the .cf files? Simply run
>>>
>>> make -C /etc/mail
>>>
>>> (just to see if there are any errors/complaints)
>>>
>>>
>>>
>> Output:
>> make: Entering directory `/etc/mail'
>> make: Leaving directory `/etc/mail'
>>
>> sendmail.cf did have content in it this time.
>>
>>> then
>>>
>>> service sendmail restart
>>>
>>>
>>>
>> I restarted the service:
>>
>> Shutting down sendmail: [ OK ]
>> Shutting down sm-client: [FAILED]
>>
>
> The submission agent wasn't running.
>
>
>> Starting sendmail: [ OK ]
>> Starting sm-client: [ OK ]
>>
>> I didn't get any complaints.
>>
>
>
>>>>> [user at FC4FW share]$ m4 /etc/mail/sendmail.mc /etc/mail/sendmail.cf
>>>>>
>
>
>>> Not the correct command syntax.
>>>
>
> You omitted the ">".
>
>
>> This was the syntax I was told to use to append changes to my .cf file.
>> If this isn't right what do I use? I had no clue about the previous
>> command you gave me to generate the sendmail.cf file correctly.
>>
>
> m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
>
> Better use the make command (which makes use of the Makefile inside
> /etc/mail) and catches more than just the .mc file changes, too the
> hashed map files.
>
> Alexander
>
>
>
So after your help with getting me started initially. I found another
FAQ (http://www.cri.ch/linux/docs/sk0009.html) that gave me a step by
step of how to set up smtp relay for sendmail.
The additional steps I took were as follows:
Added the following to the sendmail.mc file:
|* define(`SMART_HOST', `your-smtp-server')
FEATURE(authinfo)dnl*
*define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')*
Updated the sendmail.cf file
||* m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf*
Defined my account info in the AuthInfo file:
||* AuthInfo:<your-smtp-server> "U:<your-smtp-user>"
"P:<your-smtp-password>" "M:DIGEST-MD5"*
Im not sure if the "M:" is correct since the server that I would be
logging into would be over TLS port 587 and usually just does a login
challenge and nothing more. I don't know if I just need to specify login.
Updated the authinfo.db file
|||*| makemap hash /etc/mail/authinfo < /etc/mail/authinfo|*
|
Created a userdb for header rewriting
|*|user:mailname foo at bar.com|*
Created the userdb.db file
*| makemap btree /etc/mail/userdb.db < /etc/mail/userdb|*
Sendmail, Tested, and got the following output:
*[root at FC4FW mail]# /usr/sbin/sendmail -bv root at localhost
root at localhost... deliverable: mailer local, user root
[root at FC4FW mail]# /usr/sbin/sendmail -bv lovell.mcilwain at gmail.com
lovell.mcilwain at gmail.com... deliverable: mailer relay, host
foo.barr.com, user user at foo.com
*
This would leave me to belive that this was successful from what I see
in the output. But then I take a look at /var/log/maillog and find the
following:
*
*Feb 14 18:37:04 localhost sendmail[12272]: k1EEWlrh009414:
to=<lovell.mcilwain at gmail.com>, *ctladdr=<root at localhost.localdomain>*
(0/0), delay=09:04:17, xdelay=00:00:01, mailer=relay, pri=945174,
relay=foo.bar.com [11.222.333.444], dsn=5.0.0, *stat=Service unavailabl*e
Feb 14 18:37:04 localhost sendmail[12272]: k1EEWlrh009414:
k1ENb3vE012272: *sender notify: Service unavailable
*I thought the tutorial has gotten me closer to where I wanted to be but
can anyone else tell me what else Im missing to get this to work
properly? The things I noticed off the top of my head were:
1.The authentication method is wrong but I can't see any documentation
that states that the entry "M:login" will work.
2. It still looks like the return mail is showing as
root at localhost.localdomain when I thought the usersdb.db file was
supposed to take care of this. Did I need to restart sendmail or re run
the m4 command to update that there is now a usersdb.db in existance?
3. Could this be an issue of not specifying the port number correctly
for sendmail to talk with the relay server properly?
I know this mail was a bit lengthy but any help is appreciated :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060214/e3695859/attachment-0001.htm>
More information about the fedora-list
mailing list