relayhost and authentication

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
kbh
Reply | Threaded
Open this post in threaded view
|

relayhost and authentication

kbh
if the relay host has got a username and password how can i specify these in the main.cf
a google on this showed me the following:

relayhost = smtp.example.com:25
  smtp_sasl_auth_enable=yes
  smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
  smtp_sasl_security_options=

/etc/postfix/sasl_passwd:
smtp.example.com userid:password

is it the proper way of doing it? guidance appreciated

bharathan
Reply | Threaded
Open this post in threaded view
|

Re: relayhost and authentication

John Peach-2
On Tue, 15 Sep 2009 16:06:54 +0200
K bharathan <[hidden email]> wrote:

> if the relay host has got a username and password how can i specify
> these in the main.cf
> a google on this showed me the following:
>
> relayhost = smtp.example.com:25
>   smtp_sasl_auth_enable=yes
>   smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
>   smtp_sasl_security_options=
>
> /etc/postfix/sasl_passwd:
> smtp.example.com userid:password
>
> is it the proper way of doing it? guidance appreciated
>
> bharathan

relayhost = [smtp.example.com]

[smtp.example.com] userid:password





--
John
Reply | Threaded
Open this post in threaded view
|

Re: relayhost and authentication

Ansgar Wiechers
In reply to this post by kbh
On 2009-09-15 K bharathan wrote:

> if the relay host has got a username and password how can i specify
> these in the main.cf
> a google on this showed me the following:
>
> relayhost = smtp.example.com:25
>   smtp_sasl_auth_enable=yes
>   smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
>   smtp_sasl_security_options=
>
> /etc/postfix/sasl_passwd:
> smtp.example.com userid:password
>
> is it the proper way of doing it?

Yes.

You need to run "postmap /etc/postfix/sasl_passwd" to create the actual
hash file /etc/postfix/sasl_passwd.db that Postfix will use, though.
Also make sure to set restrictive permissions for the file
/etc/postfix/sasl_passwd, because it contains the password in plain
text.

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky
Reply | Threaded
Open this post in threaded view
|

Re: relayhost and authentication

Stan Hoeppner
In reply to this post by kbh
K bharathan put forth on 9/15/2009 9:06 AM:

> if the relay host has got a username and password how can i specify
> these in the main.cf <http://main.cf>
> a google on this showed me the following:
>
> relayhost = smtp.example.com:25 <http://smtp.example.com:25>
>   smtp_sasl_auth_enable=yes
>   smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
>   smtp_sasl_security_options=
>
> /etc/postfix/sasl_passwd:
> smtp.example.com <http://smtp.example.com> userid:password
>
> is it the proper way of doing it? guidance appreciated

That looks correct except for "<http://smtp.example.com>" in sasl_passwd.  I'd remove that.  Assuming that smtp.example.com accepts connections on TCP 25 this should work.  Try 587 if it doesn't work.  Oh, and I'm not sure why, but my config has smtp_sasl_security_options = noanonymous instead of a blank.

--
Stan