postfix conf for use external smtp
Ankush Grover
ankush174 at gmail.com
Sat Jul 15 07:55:45 UTC 2006
On 7/14/06, Guillermo Garron <guillermo.fedora at gmail.com> wrote:
> Hi all,
>
> some days ago i configured my sendmail server in my laptop with your help,
> but i have a problem.
>
> when my laptop is not connected to internet sendmail did not accept emails.
>
> i wonder how to configure postfix for the same thing.
>
> i did the following
>
> relayhost = my.stmp.com
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_auth_enable = yes
> smtp_sasl_security_options = noanonymous
> smtp_sasl_tls_security_options = $smtp_sasl_security_options
> smtp_use_tls = yes
>
>
relayhost = your isp mail server or smpt server -->
recipient_delimiter = +
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
> in
> /etc/postfix/sasl_passwd
> i have
>
> my.smtp.com user:password
>
> then i
> postmap /etc/postfix/sasl_passwd
>
> restart the postfix, but now i have this problem.
This is correct.
Go to /usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: login plain
Start the saslauthd
service saslauthd start
If you want tls also then put these lines in main.cf (/etc/postfix/main.cf)
For tls you have to generate certificates also
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unknown_sender_domain,
reject_rbl_client relays.ordb.org,
reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client dul.dsnbl.sorbs.net,
permit
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
smtpd_use_tls= yes
smtpd_tls_key_file= /etc/postfix/newreq.pem
smtpd_tls_cert_file=/etc/postfix/newcert.pem
smtpd_tls_CAfile=/etc/postfix/cacert.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_tls_loglevel= 1
> Jul 14 12:06:33 garron postfix/smtp[8510]: ECA31F3009D:
> to=<ggarron at hotmail.com>, relay= my.smtp.com, delay=2, status=deferred
> (Authentication failed: cannot SASL authenticate to server
> scz.alketech.com[200.87.61.8 3]: no mechanism available)
>
> i tried with
>
> smtp_sasl_security_options = noanonymous
> smtp_sasl_security_options = noplaintext, noanonymous
your ISP should support this, most of the ISP supports plain or login
authentication.
> smtp_sasl_security_options =
> but never works, with the second i got the error up. with the other it does
> not even try to login.
>
> postmap -q my.stmp.com hash:sasl_passwd
> i go this error
>
> Jul 14 13:12:13 garron postfix/postmap[9123]: fatal: open database
> sasl_passwd.db: Permission denied
> i tried even with 777 permissions
>
> any clues?
>
on one of my testing systems.
-rw------- 1 root root 63 May 24 12:13 sasl_passwd
-rw------- 1 root root 12288 May 24 12:14 sasl_passwd.db
Regards
Ankush Grover
More information about the users
mailing list