This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
[motor@localhost motor]# mail -v larry.martell@gmail.com Subject: test test . EOT larry.martell@gmail.com... Connecting to [127.0.0.1] via relay... 220 localhost.localdomain ESMTP Postfix
EHLO localhost.localdomain
250-localhost.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
MAIL From:motor@localhost.localdomain SIZE=219
250 2.1.0 Ok
RCPT To:larry.martell@gmail.com DATA
250 2.1.5 Ok 354 End data with <CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as D26C8830F larry.martell@gmail.com... Sent (Ok: queued as D26C8830F) Closing connection to [127.0.0.1]
QUIT
221 2.0.0 Bye
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
TIA! -larry
Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
<samle send elided>
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Unreachable... maybe you should have OUTPUT open, also?
mark
________________________________
From: "m.roth@5-cent.us" m.roth@5-cent.us To: CentOS mailing list centos@centos.org Sent: Tuesday, October 16, 2012 7:49 AM Subject: Re: [CentOS] setting up postfix
Larry Martell wrote: This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Have you tested to see if tcp/25 is really open? From another system:
$ telnet ip.of.postfix.box 25
Do you get a sendmail/postfix message of some sort?
______________________________________________________________________ If life gives you lemons, keep them-- because hey.. free lemons. "♥ Sticker" fixer: http://microflush.org/stuff/stickers/heartFix.html
On Tue, Oct 16, 2012 at 8:58 AM, Joseph Spenner joseph85750@yahoo.com wrote:
From: "m.roth@5-cent.us" m.roth@5-cent.us To: CentOS mailing list centos@centos.org Sent: Tuesday, October 16, 2012 7:49 AM Subject: Re: [CentOS] setting up postfix
Larry Martell wrote: This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Have you tested to see if tcp/25 is really open? From another system:
$ telnet ip.of.postfix.box 25
Do you get a sendmail/postfix message of some sort?
No, I can't connect:
# telnet 10.188.36.207 25 Connecting To 10.188.36.207...Could not open connection to the host, on port 25: Connect failed
iptables shows that port open:
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
On 16 October 2012 17:14, Larry Martell larry.martell@gmail.com wrote:
On Tue, Oct 16, 2012 at 8:58 AM, Joseph Spenner joseph85750@yahoo.com wrote:
From: "m.roth@5-cent.us" m.roth@5-cent.us To: CentOS mailing list centos@centos.org Sent: Tuesday, October 16, 2012 7:49 AM Subject: Re: [CentOS] setting up postfix
Larry Martell wrote: This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
But I don't receive the mail. In a file in /var/spool/postfix/defer I
see:
alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Have you tested to see if tcp/25 is really open? From another system:
$ telnet ip.of.postfix.box 25
Do you get a sendmail/postfix message of some sort?
No, I can't connect:
# telnet 10.188.36.207 25 Connecting To 10.188.36.207...Could not open connection to the host, on port 25: Connect failed
iptables shows that port open:
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
Hi.
It seems you are telnetting using- and have firewall rules for- an IPv4 network. Your postfix seems to be trying to use IPv6. : alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable.
Does the client's network and ISP use IPv6?
Have you tried configuring inet_protocols = ipv4 in the main.cf ? Your box might be configured with IPv6, but that doesn't mean it is usable on the network.
OT: The default policies of your chains appear to be "ACCEPT" - thus if there is no REJECT or DROP rule matching your SMTP connection, it will be automatically accepted when it hits the bottom of the chain, regardless of what ACCEPT rules you apply.
Regards, Andy.
On Tue, Oct 16, 2012 at 10:26 AM, Andy Smith spookza@gmail.com wrote:
On 16 October 2012 17:14, Larry Martell larry.martell@gmail.com wrote:
On Tue, Oct 16, 2012 at 8:58 AM, Joseph Spenner joseph85750@yahoo.com wrote:
From: "m.roth@5-cent.us" m.roth@5-cent.us To: CentOS mailing list centos@centos.org Sent: Tuesday, October 16, 2012 7:49 AM Subject: Re: [CentOS] setting up postfix
Larry Martell wrote: This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
But I don't receive the mail. In a file in /var/spool/postfix/defer I
see:
alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Have you tested to see if tcp/25 is really open? From another system:
$ telnet ip.of.postfix.box 25
Do you get a sendmail/postfix message of some sort?
No, I can't connect:
# telnet 10.188.36.207 25 Connecting To 10.188.36.207...Could not open connection to the host, on port 25: Connect failed
iptables shows that port open:
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
Hi.
It seems you are telnetting using- and have firewall rules for- an IPv4 network. Your postfix seems to be trying to use IPv6. : alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable.
Does the client's network and ISP use IPv6?
Have you tried configuring inet_protocols = ipv4 in the main.cf ? Your box might be configured with IPv6, but that doesn't mean it is usable on the network.
OT: The default policies of your chains appear to be "ACCEPT" - thus if there is no REJECT or DROP rule matching your SMTP connection, it will be automatically accepted when it hits the bottom of the chain, regardless of what ACCEPT rules you apply.
Good catch Andy. I made that change and now I can telnet to port 25 and I get:
220 localhost.localdomain ESMTP Postfix
But the outgoing mail is still failing, but now with:
reason=connect to alt4.gmail-smtp-in.l.google.com[173.194.78.27]:25: Connection timed out
Does your postfix send emails directly or do you use a smarthost for relaying? I'm asking because you're using a 10.x.y.z network which means you use NAT for outgoing connections when delivering mails directly to the destination server. Bad idea. Worse if the destination server does some sanity checks (like spf or reverse checking of your ip/dns etc).
Brgds
On Tue, Oct 16, 2012 at 11:06 AM, Benjamin Hackl b.hackl@focusmr.com wrote:
Does your postfix send emails directly or do you use a smarthost for relaying? I'm asking because you're using a 10.x.y.z network which means you use NAT for outgoing connections when delivering mails directly to the destination server. Bad idea. Worse if the destination server does some sanity checks (like spf or reverse checking of your ip/dns etc).
I really don't know the answer to that question. The scenario is that they run a django based web app, and they wanted me to add a password recovery feature to it. When I did that, and it tried to send the recovery link to the user, it failed with 'SMTPServerDisconnected.' I thought, of course, there is no SMTP server running, so I set upon getting postfix running. As I said in my initial post, I've never done that before. I'm a developer, not an admin ;-)
On Tue, Oct 16, 2012 at 12:19 PM, Larry Martell larry.martell@gmail.com wrote:
On Tue, Oct 16, 2012 at 11:06 AM, Benjamin Hackl b.hackl@focusmr.com wrote:
Does your postfix send emails directly or do you use a smarthost for relaying? I'm asking because you're using a 10.x.y.z network which means you use NAT for outgoing connections when delivering mails directly to the destination server. Bad idea. Worse if the destination server does some sanity checks (like spf or reverse checking of your ip/dns etc).
I really don't know the answer to that question. The scenario is that they run a django based web app, and they wanted me to add a password recovery feature to it. When I did that, and it tried to send the recovery link to the user, it failed with 'SMTPServerDisconnected.' I thought, of course, there is no SMTP server running, so I set upon getting postfix running. As I said in my initial post, I've never done that before. I'm a developer, not an admin ;-)
Applications that send mail normally have some configurable options. You might have the option of handing to sendmail (or the replacement program mailer the postfix provides) over a pipe or you may be able to configure sending via smtp. In the latter case, you can probably configure a relay host if one already exists for handling mail in the organization instead of running postfix locally as the relay. If you do have to run your own postfix instance, then it must either relay through a well-managed system or have a lot of things configured correctly so it can reach the recipients and will pass their spam checks.
On Tue, 16 Oct 2012 11:19:09 -0600 Larry Martell larry.martell@gmail.com wrote:
I really don't know the answer to that question. The scenario is that they run a django based web app, and they wanted me to add a password recovery feature to it. When I did that, and it tried to send the recovery link to the user, it failed with 'SMTPServerDisconnected.' I thought, of course, there is no SMTP server running, so I set upon getting postfix running. As I said in my initial post, I've never done that before. I'm a developer, not an admin ;-)
Ok. You might try to use a smarthost, that's the outgoing smtp server of your company.
/etc/postfix/main.cf should look like this myorigin=yourdomain.com relayhost=smtp.of.yourdomain.com #inet_interfaces=loopback-only local_transport=error: disabled
And then service postfix reload
If you need authentification (e.g. username + password) append the following additional lines into main.cf
smtp_sasl_auth_enable=yes smtp_sasl_security_options=noanonymous # see #smtp_sasl_mechanism_filter=plain #debug_peer_list=smtp.of.yourdomain.com #debug_peer_level=3 #smtp_use_tls=yes smtp_sasl_password_maps=hash:/etc/postfix/relay_password
Write the following line in /etc/postfix/relay_password smtp.of.yourdomain.com username:password
Create the database with
postmap /etc/postfix/relay_password
the debug options might help you if there is some trouble sending mail (log file). Always check the postfix queue with
postqueue -p
and your mailserver log
/var/log/maillog
Note: For authentication you probably need the cyrus-sasl and cyrus-sasl-* packages.
HTH, Brgds
On Tue, Oct 16, 2012 at 12:03 PM, Benjamin Hackl b.hackl@focusmr.com wrote:
On Tue, 16 Oct 2012 11:19:09 -0600 Larry Martell larry.martell@gmail.com wrote:
I really don't know the answer to that question. The scenario is that they run a django based web app, and they wanted me to add a password recovery feature to it. When I did that, and it tried to send the recovery link to the user, it failed with 'SMTPServerDisconnected.' I thought, of course, there is no SMTP server running, so I set upon getting postfix running. As I said in my initial post, I've never done that before. I'm a developer, not an admin ;-)
Ok. You might try to use a smarthost, that's the outgoing smtp server of your company.
/etc/postfix/main.cf should look like this myorigin=yourdomain.com relayhost=smtp.of.yourdomain.com #inet_interfaces=loopback-only local_transport=error: disabled
And then service postfix reload
If you need authentification (e.g. username + password) append the following additional lines into main.cf
smtp_sasl_auth_enable=yes smtp_sasl_security_options=noanonymous # see #smtp_sasl_mechanism_filter=plain #debug_peer_list=smtp.of.yourdomain.com #debug_peer_level=3 #smtp_use_tls=yes smtp_sasl_password_maps=hash:/etc/postfix/relay_password
Write the following line in /etc/postfix/relay_password smtp.of.yourdomain.com username:password
Create the database with
postmap /etc/postfix/relay_password
the debug options might help you if there is some trouble sending mail (log file). Always check the postfix queue with
postqueue -p
and your mailserver log
/var/log/maillog
Note: For authentication you probably need the cyrus-sasl and cyrus-sasl-* packages.
Thanks for the info everyone. I am going out of town for 3 weeks. My client is going to try this on their client's system. I'll revisit this and post when I get back.
On Tue, Oct 16, 2012 at 8:49 AM, m.roth@5-cent.us wrote:
Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
<samle send elided>
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
Unreachable... maybe you should have OUTPUT open, also?
Ok, I did that, but I got the same results.
On Oct 16, 2012, at 7:02 AM, Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
[motor@localhost motor]# mail -v larry.martell@gmail.com Subject: test test . EOT larry.martell@gmail.com... Connecting to [127.0.0.1] via relay... 220 localhost.localdomain ESMTP Postfix
EHLO localhost.localdomain
250-localhost.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
MAIL From:motor@localhost.localdomain SIZE=219
250 2.1.0 Ok
RCPT To:larry.martell@gmail.com DATA
250 2.1.5 Ok 354 End data with <CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as D26C8830F larry.martell@gmail.com... Sent (Ok: queued as D26C8830F) Closing connection to [127.0.0.1]
QUIT
221 2.0.0 Bye
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
---- most home broadband providers block outbound port 25 from reaching any smtp servers other than the ones that they provide and typically require authentication in order to stop spam.
Craig
On Tue, Oct 16, 2012 at 9:03 AM, Craig White craig.white@ttiltd.com wrote:
On Oct 16, 2012, at 7:02 AM, Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
[motor@localhost motor]# mail -v larry.martell@gmail.com Subject: test test . EOT larry.martell@gmail.com... Connecting to [127.0.0.1] via relay... 220 localhost.localdomain ESMTP Postfix
EHLO localhost.localdomain
250-localhost.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
MAIL From:motor@localhost.localdomain SIZE=219
250 2.1.0 Ok
RCPT To:larry.martell@gmail.com DATA
250 2.1.5 Ok 354 End data with <CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as D26C8830F larry.martell@gmail.com... Sent (Ok: queued as D26C8830F) Closing connection to [127.0.0.1]
QUIT
221 2.0.0 Bye
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
most home broadband providers block outbound port 25 from reaching any smtp servers other than the ones that they provide and typically require authentication in order to stop spam.
This is not a home machine. It's my client's machine on a corporate network.
Craig
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Larry Martell wrote:
On Tue, Oct 16, 2012 at 9:03 AM, Craig White craig.white@ttiltd.com wrote:
On Oct 16, 2012, at 7:02 AM, Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
<snip>
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
most home broadband providers block outbound port 25 from reaching any smtp servers other than the ones that they provide and typically require authentication in order to stop spam.
This is not a home machine. It's my client's machine on a corporate network.
Have you checked with the admins who administer the corporate email and firewalls? They may have it blocked.
mark
On Tue, Oct 16, 2012 at 9:25 AM, m.roth@5-cent.us wrote:
Larry Martell wrote:
On Tue, Oct 16, 2012 at 9:03 AM, Craig White craig.white@ttiltd.com wrote:
On Oct 16, 2012, at 7:02 AM, Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
<snip>
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Have I missed a step or done something wrong?
most home broadband providers block outbound port 25 from reaching any smtp servers other than the ones that they provide and typically require authentication in order to stop spam.
This is not a home machine. It's my client's machine on a corporate network.
Have you checked with the admins who administer the corporate email and firewalls? They may have it blocked.
Checking with them now.
On 10/16/2012 04:02 PM, Larry Martell wrote:
This should be an easy one. I'm trying to get postfix going. I've never done this before. I followed the directions at http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
[motor@localhost motor]# mail -v larry.martell@gmail.com Subject: test test . EOT larry.martell@gmail.com... Connecting to [127.0.0.1] via relay... 220 localhost.localdomain ESMTP Postfix
EHLO localhost.localdomain
250-localhost.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
MAIL From:motor@localhost.localdomain SIZE=219
250 2.1.0 Ok
RCPT To:larry.martell@gmail.com DATA
250 2.1.5 Ok 354 End data with <CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as D26C8830F larry.martell@gmail.com... Sent (Ok: queued as D26C8830F) Closing connection to [127.0.0.1]
QUIT
221 2.0.0 Bye
But I don't receive the mail. In a file in /var/spool/postfix/defer I see:
larry.martell@gmail.com: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable recipient=larry.martell@gmail.com offset=654 dsn_orig_rcpt=rfc822;larry.martell@gmail.com status=4.4.1 action=delayed reason=connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400d:c00::1a]:25: Network is unreachable
Since you are using IPv6 have you checked that you can ping other IPv6 systems fine?
Regards, Dennis