View Full Version : Postfix reject connections
gabrix
12th January 2007, 08:41
Postfix allow logins but rejects extra lan connections for 2 diferent reasons looking at logs,first log a connection from gmail me sending a test mail:
Jan 12 06:39:04 mail postfix/smtpd[10109]: connect from ug-out-1314.google.com[66.249.92.175]
Jan 12 06:39:12 mail postfix/smtpd[10109]: NOQUEUE: reject: RCPT from ug-out-1314.google.com[66.249.92.175]: 554 <gabrix@gabrix.ath.cx>: Relay access denied; from=<sickuser@gmail.com> to=<gabrix@gabrix.ath.cx> proto=ESMTP helo=<ug-out-1314.google.com>
Jan 12 06:39:14 mail postfix/smtpd[10109]: disconnect from ug-out-1314.google.com[66.249.92.175]
the other kind of reject:
Jan 12 07:21:36 mail postfix/smtp[10968]: 962EF1BF80: to=<gabrix@gabrix.ath.cx>, relay=none, delay=1879, status=deferred (connect to gabrix.ath.cx[82.61.94.18]: Connection refused
I'm not using any kind of fancy configuration option keeping configuration as minimum as possible this is a postconf -n:
root@mail:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
delay_warning_time = 4h
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
mydestination = mail.gabrix.ath.cx, localhost.gabrix.ath.cx, argo, localhost
myhostname = mail.gabrix.ath.cx
mynetworks = 192.168.1.1/32,192.168.1.0/24,192.168.0.0/24,127.0.0.1/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name
Thanks for help !
gabrix
12th January 2007, 23:18
I got my mail system working this is the main.cf
root@mail:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
delay_warning_time = 4h
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
mydestination = $mydomain, mail.gabrix.ath.cx, localhost.gabrix.ath.cx, argo, localhost
mydomain = gabrix.ath.cx
myhostname = mail.gabrix.ath.cx
mynetworks = 192.168.1.1/32,192.168.1.0/24,192.168.0.0/24,127.0.0.1/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name
gabrix
13th January 2007, 09:13
False allarm ! Maybe i hoped it was sorted but never say cat if it's not in the sac ... ? whatever ... Looking at logs the error is always a name resolution for interfaces i suppose , that smtpd_peer_init !
Jan 13 01:12:04 mail postfix/smtpd[9522]: warning: smtpd_peer_init: 208.67.35.129: address not listed for hostname router.xaverian.org
Jan 13 04:01:22 mail postfix/smtpd[7470]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 13 04:01:22 mail postfix/smtpd[7470]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
The main.cf is the one you see in the previous post above do you want me to post the /etc/hosts of the mail server or the gateway machine ?They are basically the same:
127.0.0.1 localhost.localdomain localhost
192.168.0.1 netgear router
192.168.0.2 argo.gabrix.ath.cx argo
192.168.1.1 argo
192.168.1.4 www.gabrix.ath.cx ftp.gabrix.ath.cx obefpldcq2yrz76y.onion irc.gabrix.$
192.168.1.6 mail.gabrix.ath.cx tor.gabrix.ath.cx cilentomalia.gabrix.ath.cx printer.gabrix.ath.cx m$
192.168.1.3 win WIN gabrix
192.168.1.2 makintoxik mac
martinfst
13th January 2007, 12:15
Did you setup a DNS server for your local lan 192.168.*.*? Looks like the name resolving and Reverse Name resolving is causing you problems.
Personally, I use a local DNS server to manage a xxxx.loc domain on a 172.16 IP range. It also serves rDNS requests to keep several packages happy that "require" valid responses to a rDNS request. I believe the smtpd deamon of postfix is such a program.
gabrix
13th January 2007, 12:22
Sure i do use dnsmasq ... serving names on the lan interface ...
falko
13th January 2007, 16:10
Please try this:
postconf -e 'disable_dns_lookups = yes' and restart Postfix.
gabrix
13th January 2007, 17:57
Great falko ... i was right thinking to something like that i will let you know if it worked !
gabrix
15th January 2007, 19:02
Bad news still same error ... dns are set and i'm generally suffering of slow internet even browsing.
root@mail:~# tail -f /var/log/mail/warn
Jan 15 15:02:56 mail postfix/smtpd[21649]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
There is a problem apart from postfix i think:
Jan 15 15:11:09 mail postfix/smtp[21742]: B41C81BFD3: to=<gabryfor@alice.it>, relay=none, delay=58882, status=deferred (connect to alice.it[217.169.121.251]: Connection timed out)
Jan 15 15:11:37 mail postfix/smtp[21734]: connect to gmail.com[64.233.161.83]: Connection timed out (port 25)
Jan 15 15:12:07 mail postfix/smtp[21734]: connect to gmail.com[216.239.57.83]: Connection timed out (port 25)
Jan 15 15:12:07 mail postfix/smtp[21734]: 006451BFD0: to=<sickuser@gmail.com>, relay=none, delay=59779, status=deferred (connect to gmail.com[216.239.57.83]: Connection timed out)
I'm using as dns the opendns service could it be the cause ?
falko
16th January 2007, 16:31
Please check if your server is blacklisted: http://www.mxtoolbox.com/blacklists.aspx
gabrix
16th January 2007, 20:02
No it's not ... !
I have set opendns as my main dnsservers and they are located in london and i'm south italy.That's for privacy reasons they garantee don't record dns queries and anyway are in an another country , different laws and all that! They have powerfull computers but offcourse alice dnses are closer and my browsing is faster when i'm on alice dns.For my inside lan computers in /etc/resolv.conf file i have set my dnsmasq as first dns which is listening on eth1 gateway machine and opendsnes after .The gateway machine has opendns as first in resolv.conf.I have been changing the order too many times what do you think would be the right order ? What do you think of opendns ?
falko
17th January 2007, 20:33
As long as there are valid nameservers in /etc/resolv.conf the order of the nameservers doesn't matter much.
Do you have SPf records for your domains?
If you are sure you're not blacklisted, I'd contact Gmail and ask why your emails are blocked.
gabrix
17th January 2007, 21:16
SPf ???? Spam .... and than ? I got to the site you linked and tiped my domain name in the ip address box ... what ip can be blaklisted if dynamic ... ?
gabrix
18th January 2007, 03:36
I defenitly found out that gmail but also libero.it and a friend of mine who registred at my site didn't get password sent from my site on his hotmail.com account .I have sent few minutes ago some mails to mailing lists like the or-talk and bleeding-snort and i got mails from them they delivered mine .But this just after the last changes i gave to main.cf resolving (finger crossed!) the smtp_peer_init businnes i'm regulary receiving mail reports from logcheck on the gateway machine.
My question is , the directive relayhost = smtp.big.provider would sort this problem out ?How do i set it ?If i choose gmail shall i use the exact gmail smtp address (???) or would be all right a more generic smtp.gmail.com ?Or any other way ????
logs update:
Jan 18 07:01:04 mail postfix/qmgr[21157]: 08FAE1BFF1: removed
Jan 18 07:01:04 mail postfix/qmgr[21157]: 08FAE1BFF1: removed
Jan 18 07:02:14 mail postfix/smtpd[22308]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 18 07:02:14 mail postfix/smtpd[22308]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 18 07:02:14 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 220 mail.gabrix.ath.cx ESMTP Postfix
Jan 18 07:02:14 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 220 mail.gabrix.ath.cx ESMTP Postfix
Jan 18 07:02:14 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:14 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:14 mail postfix/smtpd[22308]: < unknown[192.168.1.1]: HELO argo.gabrix.ath.cx
Jan 18 07:02:14 mail postfix/smtpd[22308]: < unknown[192.168.1.1]: HELO argo.gabrix.ath.cx
Jan 18 07:02:14 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 mail.gabrix.ath.cx
Jan 18 07:02:14 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 mail.gabrix.ath.cx
Jan 18 07:02:15 mail postfix/smtpd[22308]: rewrite_clnt: canonicalize: postmaster -> postmaster@mail.gabrix.ath.cx
Jan 18 07:02:15 mail postfix/smtpd[22308]: rewrite_clnt: canonicalize: postmaster -> postmaster@mail.gabrix.ath.cx
Jan 18 07:02:15 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 Ok
Jan 18 07:02:15 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 Ok
Jan 18 07:02:16 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:16 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:16 mail postfix/smtpd[22308]: < unknown[192.168.1.1]: DATA
Jan 18 07:02:16 mail postfix/smtpd[22308]: < unknown[192.168.1.1]: DATA
Jan 18 07:02:16 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 354 End data with <CR><LF>.<CR><LF>
Jan 18 07:02:16 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 354 End data with <CR><LF>.<CR><LF>
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: status
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: status
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: status
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: status
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute value: 0
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute value: 0
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: reason
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: reason
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: reason
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: reason
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute value: (end)
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute value: (end)
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: (list terminator)
Jan 18 07:02:16 mail postfix/smtpd[22308]: public/cleanup socket: wanted attribute: (list terminator)
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: (end)
Jan 18 07:02:16 mail postfix/smtpd[22308]: input attribute name: (end)
Jan 18 07:02:16 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 Ok: queued as 985B81BFF0
Jan 18 07:02:16 mail postfix/smtpd[22308]: > unknown[192.168.1.1]: 250 Ok: queued as 985B81BFF0
Jan 18 07:02:16 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:16 mail postfix/smtpd[22308]: watchdog_pat: 0x806e6a0
Jan 18 07:02:16 mail postfix/smtpd[22308]: smtp_get: EOF
Jan 18 07:02:16 mail postfix/smtpd[22308]: smtp_get: EOF
Jan 18 07:02:16 mail postfix/qmgr[21157]: 985B81BFF0: removed
Jan 18 07:02:16 mail postfix/qmgr[21157]: 985B81BFF0: removed
(port 25)
Jan 18 07:21:18 mail postfix/smtp[22345]: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused (port 25)
Jan 18 07:21:18 mail postfix/smtp[22345]: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused (port 25)
Jan 18 07:21:18 mail postfix/smtp[22343]: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused (port 25)
Jan 18 07:21:18 mail postfix/smtp[22343]: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused (port 25)
Jan 18 07:21:18 mail postfix/qmgr[21157]: BE6641BFB1: from=<>, status=expired, returned to sender
Jan 18 07:21:18 mail postfix/qmgr[21157]: BE6641BFB1: from=<>, status=expired, returned to sender
Jan 18 07:21:18 mail postfix/qmgr[21157]: BE6641BFB1: removed
Jan 18 07:21:18 mail postfix/qmgr[21157]: BE6641BFB1: removed
Jan 18 07:21:19 mail postfix/qmgr[21157]: CEB4D1BFD1: to=<root@www.gabrix.ath.cx>, relay=none, delay=23627, status=deferred (delivery temporarily suspended: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused)
Jan 18 07:21:19 mail postfix/qmgr[21157]: CEB4D1BFD1: to=<root@www.gabrix.ath.cx>, relay=none, delay=23627, status=deferred (delivery temporarily suspended: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused)
Jan 18 07:21:24 mail postfix/smtp[22352]: connect to email.it[80.247.77.101]: Connection refused (port 25)
Jan 18 07:21:24 mail postfix/smtp[22352]: connect to email.it[80.247.77.101]: Connection refused (port 25)
There is something wrong anyway ....
falko
18th January 2007, 21:50
My question is , the directive relayhost = smtp.big.provider would sort this problem out ?How do i set it ?If i choose gmail shall i use the exact gmail smtp address (???) or would be all right a more generic smtp.gmail.com ?Or any other way ????
logs update:
Take a look here: http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost
gabrix
20th January 2007, 03:35
You know what ! I'm been running a mixmaster remailer for a little while recently , but i stopped it and removed it ... If i'm in a blacklist it's for this reason i supposed , cause wherever i send a mail it doesn't get delivered ,hotmail,ecn.org,virgilio,gmail ecc. It's really few where my mail does get through.That's really bad ! How can i get over this ?
I contacted the mtoolbox people and i'm waiting to see they can do ...
gabrix
21st January 2007, 16:08
I'm getting mail delivered but i don't know of much of it get removed . Looking at logs the score is not encouraging :
Jan 21 13:01:03 mail postfix/qmgr[8309]: C8F101BFF1: removed
Jan 21 13:01:03 mail postfix/qmgr[8309]: C8F101BFF1: removed
Jan 21 13:02:24 mail postfix/smtpd[12291]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 21 13:02:24 mail postfix/smtpd[12291]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 21 13:02:24 mail postfix/smtpd[12291]: > unknown[192.168.1.1]: 220 mail.gabrix.ath.cx ESMTP Postfix
Jan 21 13:02:24 mail postfix/smtpd[12291]: > unknown[192.168.1.1]: 220 mail.gabrix.ath.cx ESMTP Postfix
Jan 21 13:02:24 mail postfix/smtpd[12291]: watchdog_pat: 0x806e708
Jan 21 13:02:24 mail postfix/smtpd[12291]: watchdog_pat: 0x806e708
Jan 21 13:02:24 mail postfix/smtpd[12291]: < unknown[192.168.1.1]: HELO argo.gabrix.ath.cx
Jan 21 13:02:24 mail postfix/smtpd[12291]: < unknown[192.168.1.1]: HELO argo.gabrix.ath.cx
Jan 21 13:02:24 mail postfix/smtpd[12291]: > unknown[192.168.1.1]: 250 mail.gabrix.ath.cx
Jan 21 13:02:24 mail postfix/smtpd[12291]: > unknown[192.168.1.1]: 250 mail.gabrix.ath.cx
Jan 21 13:02:24 mail postfix/smtpd[12291]: watchdog_pat: 0x806e708
Jan 21 13:02:24 mail postfix/smtpd[12291]: watchdog_pat: 0x806e708
Jan 21 13:02:24 mail postfix/smtpd[12291]: < unknown[192.168.1.1]: MAIL FROM:<logcheck@argo.gabrix.ath.cx>
as well as:
Jan 21 13:56:24 mail postfix/qmgr[8309]: CEB4D1BFD1: to=<root@www.gabrix.ath.cx>, relay=none, delay=306532, status=deferred (delivery temporarily suspended: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused)
Jan 21 13:56:24 mail postfix/qmgr[8309]: CEB4D1BFD1: to=<root@www.gabrix.ath.cx>, relay=none, delay=306532, status=deferred (delivery temporarily suspended: connect to www.gabrix.ath.cx[192.168.1.4]: Connection refused)
That's my actual main.cf:
root@mail:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
debug_peer_list = 192.168.1.0/24 ,192.168.0.0/24
delay_warning_time = 4h
disable_dns_lookups = yes
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 0
mydestination = $mydomain, mail.gabrix.ath.cx, localhost.gabrix.ath.cx, , argo.gabrix.ath.cx, argo,localhost
mydomain = gabrix.ath.cx
myhostname = mail.gabrix.ath.cx
mynetworks = 192.168.1.0/24,192.168.0.0/24,127.0.0.1/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit
smtpd_reject_unlisted_recipient = no
falko
21st January 2007, 16:47
It must be
mynetworks = 192.168.1.0/24,192.168.0.0/24,127.0.0.0/8
Please change it and restart Postfix.
gabrix
21st January 2007, 16:59
Ok,done!What about the variable inet_interfaces shall i use the main eth0 ip 192.168.1.6 instead of ' all ' ?This way maybe the above change is going to be useless .... attached there is the last mail log.
falko
22nd January 2007, 15:02
inet_interfaces = all is ok.
Jan 21 13:02:24 mail postfix/smtpd[12291]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo
Jan 21 13:02:24 mail postfix/smtpd[12291]: warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argoWhat's in /etc/hosts?
Jan 18 07:21:24 mail postfix/smtp[22352]: connect to email.it[80.247.77.101]: Connection refused (port 25)
Jan 18 07:21:24 mail postfix/smtp[22352]: connect to email.it[80.247.77.101]: Connection refused (port 25)If you are not blacklisted you should ask email.it why your server is blocked by them.
gabrix
22nd January 2007, 17:52
/etc/hosts on the postfix machine (mail):
127.0.0.1 localhost.localdomain localhost
192.168.0.1 netgear router
192.168.0.2 argo.gabrix.ath.cx argo squid.gabrix.ath.cx
192.168.1.1 argo.gabrix.ath.cx gateway
192.168.1.2 makintoxik.gabrix.ath.cx makintoxik mac
192.168.1.4 www.gabrix.ath.cx tor.gabrix.ath.cx ftp.gabrix.ath.cx irc.gabrix.ath.cx jabber.gabrix.ath.cx w$
192.168.1.6 mail.gabrix.ath.cx printer.gabrix.ath.cx mail
What about email.it?It's an email provider !What could they do ?Maybe relay ?Actually i cannot send anywhere in the internet all my mail get bounced .
gabrix
22nd January 2007, 23:10
I use DynDns.org for my dynamic ip.They offer other services like MailHop Forward , MailHop Relay and MailHop OutBound.You can check here https://www.dyndns.com/services/ What do you advice me to do to?I was thinking to the OutBound , but i'm not sure which will be proper . How should i configure postfix for it and resolve my blacklisted domain ???? Thanks !
falko
23rd January 2007, 19:21
I use DynDns.org for my dynamic ip.They offer other services like MailHop Forward , MailHop Relay and MailHop OutBound.You can check here https://www.dyndns.com/services/ What do you advice me to do to?I was thinking to the OutBound , but i'm not sure which will be proper . How should i configure postfix for it and resolve my blacklisted domain ???? Thanks !
So you're using a dynamic IP address. I'm sure this is the reason you're blocked. Most dynamic IP addresses are blocked nowadays because spammers used to use dynamic IP addresses.
192.168.0.2 argo.gabrix.ath.cx argo squid.gabrix.ath.cx
192.168.1.1 argo.gabrix.ath.cx gateway
You listed two different IP addresses for argo in /etc/hosts. I think that's the cause of the warning: smtpd_peer_init: 192.168.1.1: address not listed for hostname argo error.
gabrix
23rd January 2007, 21:08
I have been sending emails user@gabrix.ath.cx for nearly 1 year and a half by now and all of a sudden this isp planetary decision to consider dynamic ips as spam .... If there was a way to alias my domain name with a more common .org or .it at dns level ...
You listed two different IP addresses for argo in /etc/hosts. I think that's the cause of the
I have that error in a way or the other anyway if you look my previous /etc/hosts posts you'd see ... i'm depressed i had such an efficient personal mail system once ....
falko
24th January 2007, 14:12
I have been sending emails user@gabrix.ath.cx for nearly 1 year and a half by now and all of a sudden this isp planetary decision to consider dynamic ips as spam .... If there was a way to alias my domain name with a more common .org or .it at dns level ...
You should consider relaying through another mail server (e.g. the one of your ISP): http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost
gabrix
24th January 2007, 21:17
I have set the postfix to relay on smtp.gmail.com this what i added to main.cf:
relayhost = smtp.gmail.com
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
libsasl is configured and this is what is in sasl_passwd:
smtp.gmail.com sickuser@gmail.com:xagsdji8jdf
I'm using my actual gmail account.
Jan 24 19:53:11 mail postfix/smtp[21126]: connect to smtp.gmail.com [66.249.83.109]: read timeout (port 25)
Jan 24 19:53:11 mail postfix/smtp[21126]: connect to smtp.gmail.com [66.249.83.109]: read timeout (port 25)
Jan 24 19:53:13 mail postfix/qmgr[20977]: B77CC1BFC2: removed
Jan 24 19:53:13 mail postfix/qmgr[20977]: B77CC1BFC2: removed
Jan 24 19:53:13 mail postfix/qmgr[20977]: C85891BF99: removed
Jan 24 19:53:13 mail postfix/qmgr[20977]: C85891BF99: removed
gabrix
25th January 2007, 00:20
Realying mail to gmail requires mandatorly the use of saal2-bin package right ?So i have set my postfix accordingly to some tutorials i have foung here but now my password get rejected these are my settings:
root@mail:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_list = 192.168.1.0/24 ,192.168.0.0/24
delay_warning_time = 4h
disable_dns_lookups = yes
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 0
mydestination = $mydomain, mail.gabrix.ath.cx, www.gabrix.ath.cx, localhost.gabrix.ath.cx, , argo.gabrix.ath.cx, argo,localhost
mydomain = gabrix.ath.cx
myhostname = mail.gabrix.ath.cx
mynetworks = 192.168.1.0/24,192.168.0.0/24,127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = gmail-smtp.l.google.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_unauth_destinatio n, permit
smtpd_reject_unlisted_recipient = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options =
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/cert.pem
smtpd_tls_key_file = /etc/postfix/ssl/key.pem
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
The file /etc/postfix/sasl/sasl_passwd only contains this:
gmail-smtp.l.google.com sickuser@gmail.com:dhghghjf
I have CP hosts localtime nsswitch.conf resolv.conf services to /var/spool/postfix/etc shall i CP also passwd to that dir ?How do i say to postfix of new passwd location ?
and in logs i get this:
Jan 24 22:55:22 mail postfix/smtpd[24109]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
And finally the connection result with smtp.gmail.com
Jan 25 00:55:53 mail postfix/smtp[25301]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 00:55:53 mail postfix/smtp[25301]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=20:unable to get local issuer certificate
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=20:unable to get local issuer certificate
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=27:certificate not trusted
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=27:certificate not trusted
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=21:unable to verify the first certificate
Jan 25 00:55:56 mail postfix/smtp[25301]: verify error:num=21:unable to verify the first certificate
Jan 25 00:55:59 mail postfix/smtp[25301]: Peer certificate could not be verified
Jan 25 00:55:59 mail postfix/smtp[25301]: Peer certificate could not be verified
Jan 25 00:56:09 mail postfix/qmgr[24799]: 826FF1BFB9: removed
Jan 25 00:56:09 mail postfix/qmgr[24799]: 826FF1BFB9: removed
This is a log update
Jan 25 04:02:54 mail postfix/smtp[4527]: warning: SASL authentication failure: No worthy mechs found
Jan 25 04:02:54 mail postfix/smtp[4527]: warning: SASL authentication failure: No worthy mechs found
Jan 25 04:02:54 mail postfix/smtp[4527]: 0B7A71BFB7: to=<gabrix@gabrix.ath.cx>, relay=gmail-smtp.l.google.com[72.14.205.109], delay=27, status=deferred (Authentication failed: cannot SASL authenticate to server gmail-smtp.l.google.com[72.14.205.109]: no mechanism available)
That's where i got smtp.gmail.com connection details and instructions to set a relayhost on postfix with gmail:
http://groups.google.com/group/alt.comp.mail.postfix/browse_thread/thread/a0ca77642aefa126/01ea513fc0003d95?lnk=raot
gabrix
25th January 2007, 08:54
After few hours these are the changes i made to main.cf
< smtp_sasl_auth_enable = yes
< smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
---
> smtp_sasl_auth_enable = no
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
29,30c29,30
< smtpd_sasl_auth_enable = yes
< smtpd_sasl_local_domain = $myhostname
---
> smtpd_sasl_auth_enable = no
> smtpd_sasl_local_domain = $mydomain
36a37
> smtpd_tls_received_header = yes
At the list now i can send mails ... they don'get delivered still but i better go on carefull.
This instead is a log after i sent an email to my libero account:
Jan 25 07:36:45 mail postfix/smtp[8225]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 07:36:45 mail postfix/smtp[8225]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=20:unable to get local issuer certificate
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=20:unable to get local issuer certificate
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=27:certificate not trusted
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=27:certificate not trusted
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=21:unable to verify the first certificate
Jan 25 07:36:48 mail postfix/smtp[8225]: verify error:num=21:unable to verify the first certificate
Jan 25 07:36:51 mail postfix/smtp[8225]: Peer certificate could not be verified
Jan 25 07:36:51 mail postfix/smtp[8225]: Peer certificate could not be verified
Jan 25 07:36:57 mail postfix/smtp[8225]: C5AC51BFAC: to=<gabriele2003@libero.it>, relay=gmail-smtp.l.google.com[66.249.83.1
11], delay=35, status=bounced (host gmail-smtp.l.google.com[66.249.83.111] said: 530 5.5.1 Authentication Required i14sm205
6736wxd (in reply to MAIL FROM command))
Jan 25 07:36:57 mail postfix/smtp[8225]: C5AC51BFAC: to=<gabriele2003@libero.it>, relay=gmail-smtp.l.google.com[66.249.83.1
11], delay=35, status=bounced (host gmail-smtp.l.google.com[66.249.83.111] said: 530 5.5.1 Authentication Required i14sm205
6736wxd (in reply to MAIL FROM command))
Jan 25 07:37:01 mail postfix/cleanup[8224]: 0775A1BFB7: message-id=<20070125063701.0775A1BFB7@mail.gabrix.ath.cx>
Jan 25 07:37:01 mail postfix/cleanup[8224]: 0775A1BFB7: message-id=<20070125063701.0775A1BFB7@mail.gabrix.ath.cx>
Jan 25 07:37:01 mail postfix/qmgr[8051]: 0775A1BFB7: from=<>, size=2573, nrcpt=1 (queue active)
Jan 25 07:37:01 mail postfix/qmgr[8051]: 0775A1BFB7: from=<>, size=2573, nrcpt=1 (queue active)
Jan 25 07:37:01 mail postfix/qmgr[8051]: C5AC51BFAC: removed
Jan 25 07:37:01 mail postfix/qmgr[8051]: C5AC51BFAC: removed
Jan 25 07:37:01 mail postfix/local[8231]: 0775A1BFB7: to=<gabrix@gabrix.ath.cx>, relay=local, delay=0, status=sent (deliver
ed to maildir)
Jan 25 07:37:01 mail postfix/local[8231]: 0775A1BFB7: to=<gabrix@gabrix.ath.cx>, relay=local, delay=0, status=sent (deliver
ed to maildir)
Jan 25 07:37:01 mail postfix/qmgr[8051]: 0775A1BFB7: removed
These are the data of the mail bounced from libero.it:
<gabriele2003@libero.it>: host gmail-smtp.l.google.com[66.249.83.111] said: 530
5.5.1 Authentication Required i14sm2056736wxd (in reply to MAIL FROM
command)
gabrix
25th January 2007, 09:37
EUREKA!!!! Risolto !!!
The relay worked finally !
These are the changes i made to main.cf :
< relayhost = gmail-smtp.l.google.com
< smtp_sasl_auth_enable = no
---
> relayhost = [gmail-smtp.l.google.com]
> smtp_sasl_auth_enable = yes
23a24,25
> smtp_sasl_security_options =
> smtp_sasl_tls_security_options = noanonymous
31d32
< smtpd_sasl_security_options =
and this is the log:
Jan 25 08:16:51 mail postfix/smtp[8894]: 8AC7E1BFAC: to=<gabrix666k@yahoo.it>, relay=gmail-smtp.l.google.com[66.249.83.111]
, delay=52, status=sent (250 2.0.0 OK 1169709395 h8sm2156071wxd)
Jan 25 08:16:51 mail postfix/smtp[8894]: 8AC7E1BFAC: to=<gabrix666k@yahoo.it>, relay=gmail-smtp.l.google.com[66.249.83.111]
, delay=52, status=sent (250 2.0.0 OK 1169709395 h8sm2156071wxd)
I sent this mail to my yahoo account there are still some i hope details to consider looking at logs:
Jan 25 08:16:20 mail postfix/smtp[8894]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 08:16:20 mail postfix/smtp[8894]: setting up TLS connection to gmail-smtp.l.google.com
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=20:unable to get local issuer certificate
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=20:unable to get local issuer certificate
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=27:certificate not trusted
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=27:certificate not trusted
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=21:unable to verify the first certificate
Jan 25 08:16:23 mail postfix/smtp[8894]: verify error:num=21:unable to verify the first certificate
Jan 25 08:16:26 mail postfix/smtp[8894]: Peer certificate could not be verified
Jan 25 08:16:26 mail postfix/smtp[8894]: Peer certificate could not be verified
Should i get worried of these errors ?Where do they come from ???Is it because they are selfsigned certificates ?
The mail arrived to yahoo using this email "gabrix" <sickuser@gmail.com> and pukka !!!All sorted out !!!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.