Hi; I tried this: [root@mydomain ccc]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. EHLO MAIL FROM: me@gmail.com RCPT TO: me@gmail.com DATA testing from server . ^] but I never get back to a command prompt. Please advise. TIA, John
On Tue, 16 Oct 2012, John Reddy wrote:
[root@mydomain ccc]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. EHLO MAIL FROM: me@gmail.com RCPT TO: me@gmail.com DATA testing from server . ^] but I never get back to a command prompt. Please advise.
(1) EHLO usually takes an argument (2) QUIT is missing
-s
Steve Thompson wrote the following on 10/16/2012 7:45 AM:
On Tue, 16 Oct 2012, John Reddy wrote:
[root@mydomain ccc]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. EHLO MAIL FROM: me@gmail.com RCPT TO: me@gmail.com DATA testing from server . ^] but I never get back to a command prompt. Please advise.
(1) EHLO usually takes an argument (2) QUIT is missing
-s
There's also no server greeting or server acknowledgement to any of your commands the client entered. Were they removed or were they never present? It doesn't look like a working SMTP server is accepting your connection.
I got the first example from the postfix documentation here: http://www.postfix.org/SASL_README.html so I tried what I originally posted: [root@mydomain ccc]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. EHLO MAIL FROM: me@gmail.com RCPT TO: me@gmail.com DATA testing from server . ^]
So I go to this page and get an example of how to do this: http://www.freebsdwiki.net/index.php/SMTP,_testing_via_Telnet and follow the example:
[root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HELO justtesting MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA To: testing@gmail.com From: testing@gmail.com Subject: testing Date: Tu, Oct 2012 10:21:11 -0500 Testing . QUIT
So I go to this page and get an example of how to do this: http://www.samlogic.net/articles/smtp-commands-reference.htm and follow the example:
[root@mydomain john]# ps wax|grep smtp 18378 ? S 0:00 smtpd -n smtp -t inet -u -s 2 26426 ? S 0:00 smtpd -n 587 -t inet -u -s 2 30700 pts/0 S+ 0:00 grep smtp [root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. EHLO mydomain.com MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA testing . QUIT
As you can see, my smtp is up. However, all of these just leave the shell hanging. None of them echo back anything from telnet, as I've seen in examples, such as this echo: ph34r# telnet localhost 25 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. 220 ESMTP
(That last line.) I've never gotten telnet to work. I've always just worked around it, but this time I want to check everything as I go along. Please advise. TIA, John
From: John Reddy linuxpencil@hotmail.com To: centos@centos.org Sent: Tuesday, October 16, 2012 7:30 AM Subject: Re: [CentOS] Sending Email Via Telnet
So I go to this page and get an example of how to do this: http://www.freebsdwiki.net/index.php/SMTP,_testing_via_Telnet and follow the example:
[root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HELO justtesting MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA To: testing@gmail.com From: testing@gmail.com Subject: testing Date: Tu, Oct 2012 10:21:11 -0500 Testing . QUIT
Something isn't quite right with your setup. When you do the "HELO" command, the server should reply with something. For example:
== $ telnet smtp.comcast.net 25 Trying 76.96.40.155... Connected to smtp.comcast.net. Escape character is '^]'. 220 omta12.emeryville.ca.mail.comcast.net comcast ESMTP server ready HELO comcast.net 250 omta12.emeryville.ca.mail.comcast.net hello [69.24.1.7], pleased to meet you ==
Does the mail server ever return anything back to you?
Something isn't quite right with your setup. When you do the "HELO" command, the server should reply with something. For example:
== $ telnet smtp.comcast.net 25 Trying 76.96.40.155... Connected to smtp.comcast.net. Escape character is '^]'. 220 omta12.emeryville.ca.mail.comcast.net comcast ESMTP server ready HELO comcast.net 250 omta12.emeryville.ca.mail.comcast.net hello [69.24.1.7], pleased to meet you ==
Does the mail server ever return anything back to you?
No. Never. How do I trouble-shoot this? TIA, John
on 10/16/2012 8:16 AM John Reddy spake the following:
Something isn't quite right with your setup. When you do the "HELO" command, the server should reply with something. For example:
== $ telnet smtp.comcast.net 25 Trying 76.96.40.155... Connected to smtp.comcast.net. Escape character is '^]'. 220 omta12.emeryville.ca.mail.comcast.net comcast ESMTP server ready HELO comcast.net 250 omta12.emeryville.ca.mail.comcast.net hello [69.24.1.7], pleased to meet you ==
Does the mail server ever return anything back to you?
No. Never. How do I trouble-shoot this? TIA, John
Do you have anything like greylisting or greetpause running?
On 16/10/2012 16:16, John Reddy wrote:
Something isn't quite right with your setup. When you do the "HELO" command, the server should reply with something. For example:
== $ telnet smtp.comcast.net 25 Trying 76.96.40.155... Connected to smtp.comcast.net. Escape character is '^]'. 220 omta12.emeryville.ca.mail.comcast.net comcast ESMTP server ready HELO comcast.net 250 omta12.emeryville.ca.mail.comcast.net hello [69.24.1.7], pleased to meet you ==
Does the mail server ever return anything back to you?
Sometimes, if you are traversing a firewall between you and the mail server the firewall blocks the connection because telnet uses the tcp PUSH flag.
On 10/16/2012 04:42 PM, Joseph Spenner wrote:
From: John Reddylinuxpencil@hotmail.com To: centos@centos.org Sent: Tuesday, October 16, 2012 7:30 AM Subject: Re: [CentOS] Sending Email Via Telnet
So I go to this page and get an example of how to do this: http://www.freebsdwiki.net/index.php/SMTP,_testing_via_Telnet and follow the example:
[root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HELO justtesting MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA To: testing@gmail.com From: testing@gmail.com Subject: testing Date: Tu, Oct 2012 10:21:11 -0500 Testing . QUIT
Something isn't quite right with your setup. When you do the "HELO" command, the server should reply with something. For example:
== $ telnet smtp.comcast.net 25 Trying 76.96.40.155... Connected to smtp.comcast.net. Escape character is '^]'. 220 omta12.emeryville.ca.mail.comcast.net comcast ESMTP server ready HELO comcast.net 250 omta12.emeryville.ca.mail.comcast.net hello [69.24.1.7], pleased to meet you ==
Does the mail server ever return anything back to you? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
The correct way to get out of a Telnet session is to use the escape sequence given. <Esc>] shown as "Escape character is '^]'" in your session above. That should get you back to your prompt.
ChrisG
is any email program running? run: netstat -pant|grep ":25"|grep LISTEN to see if any program is listening... output should look like: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21493/sendmail
guess it'll say 'postfix' or 'master' instead of 'sendmail' on RH6.
On Tue, Oct 16, 2012 at 11:10 AM, Steven Tardy sjt5@its.msstate.edu wrote:
is any email program running? run: netstat -pant|grep ":25"|grep LISTEN to see if any program is listening... output should look like: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21493/sendmail
guess it'll say 'postfix' or 'master' instead of 'sendmail' on RH6.
How long are you waiting for a response to appear? Mailers do an assortment of reverse-dns lookups and perhaps an ident query to the source before responding. If you firewall these with a 'drop' instead of 'reject' you leave the application hanging for fairly long timeout. And some mailers have a config option for an intentional delay before their first message and will drop the connection it the other end sends first (snmp protocol requires the connecting host to wait). Also, you should have something showing up in /var/log/mailllog about the connections.
netstat -pant|grep ":25"|grep LISTEN to see if any program is listening... output should look like: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21493/sendmail
guess it'll say 'postfix' or 'master' instead of 'sendmail' on RH6.
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
How long are you waiting for a response to appear? Mailers do an assortment of reverse-dns lookups and perhaps an ident query to the source before responding. If you firewall these with a 'drop' instead of 'reject' you leave the application hanging for fairly long timeout. And some mailers have a config option for an intentional delay before their first message and will drop the connection it the other end sends first (snmp protocol requires the connecting host to wait). Also, you should have something showing up in /var/log/mailllog about the connections.
I can't find anything in there that corresponds to the attempt to send an email. And why would I when there is no communication from the server in my telnet session? The problem appears to be in telnet, not in postfix. Again, this is one of 3 examples of my telnet sessions from 2 emails ago:
[root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HELO justtesting MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA To: testing@gmail.com From: testing@gmail.com Subject: testing Date: Tu, Oct 2012 10:21:11 -0500 Testing . QUIT
Then it hangs. I never get back to a command prompt. There is never any interaction with the telnet program after the initial response. How do I trouble-shoot this? TIA, John
On Tue, Oct 16, 2012 at 12:46 PM, John Reddy linuxpencil@hotmail.com wrote:
netstat -pant|grep ":25"|grep LISTEN to see if any program is listening... output should look like: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21493/sendmail
guess it'll say 'postfix' or 'master' instead of 'sendmail' on RH6.
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
How long are you waiting for a response to appear? Mailers do an assortment of reverse-dns lookups and perhaps an ident query to the source before responding. If you firewall these with a 'drop' instead of 'reject' you leave the application hanging for fairly long timeout. And some mailers have a config option for an intentional delay before their first message and will drop the connection it the other end sends first (snmp protocol requires the connecting host to wait). Also, you should have something showing up in /var/log/mailllog about the connections.
I can't find anything in there that corresponds to the attempt to send an email. And why would I when there is no communication from the server in my telnet session? The problem appears to be in telnet, not in postfix. Again, this is one of 3 examples of my telnet sessions from 2 emails ago:
[root@mydomain john]# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HELO justtesting MAIL FROM: testing@gmail.com RCPT TO: testing@gmail.com DATA To: testing@gmail.com From: testing@gmail.com Subject: testing Date: Tu, Oct 2012 10:21:11 -0500 Testing . QUIT
Then it hangs. I never get back to a command prompt. There is never any interaction with the telnet program after the initial response. How do I trouble-shoot this?
You aren't supposed to send anything until you get a 2xx response from the server. But, since the connection was accepted, something must be happening - maybe the strace will show some activity or error. My knee-jerk reaction to any mysterious problem is SELinux - is it in the picture?
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
Alexander Dalloz wrote the following on 10/16/2012 1:41 PM:
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
+1
On Wed, Oct 17, 2012 at 8:40 AM, Blake Hudson blake@ispn.net wrote:
Alexander Dalloz wrote the following on 10/16/2012 1:41 PM:
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
+1
The OP did say a few messages above that there was nothing in the logs.
Cheers,
Cliff
Am 16.10.2012 22:57, schrieb Cliff Pratt:
On Wed, Oct 17, 2012 at 8:40 AM, Blake Hudson blake@ispn.net wrote:
Alexander Dalloz wrote the following on 10/16/2012 1:41 PM:
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
+1
The OP did say a few messages above that there was nothing in the logs.
Cheers,
Cliff
Sorry, I must have missed that part.
But it really cannot be that a `service postfix restart' does not send anything to syslog(). If the /var/log/maillog keeps silent, then either the OP has damaged syslogging or he has a bigger problem.
It must be ensured that logging works. Then besides watching the mail logfile I suggest to observe other vital logs as well, such as messages, audit.log and bind logging in case a local nameserver is running.
My wild guessing is that Postfix misbehaves because there is a problem with name resolving. A typical cause would be because /etc/hosts has no 127.0.0.1 / localhost mapping. So checking /etc/hosts, /etc/resolv.conf and the self-identification of the system (hostname) is important.
Hope it helps.
Regards
Alexander
________________________________
On Wed, Oct 17, 2012 at 8:40 AM, Blake Hudson blake@ispn.net wrote:
Alexander Dalloz wrote the following on 10/16/2012 1:41 PM:
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
Could SELinux be responsible?
______________________________________________________________________ If life gives you lemons, keep them-- because hey.. free lemons. "♥ Sticker" fixer: http://microflush.org/stuff/stickers/heartFix.html
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
# postconf -n alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_list = disable_vrfy_command = yes home_mailbox = Mailbox html_directory = no inet_interfaces = localhost, $myhostname invalid_hostname_reject_code = 450 mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_command = /usr/local/libexec/dovecot/deliver -f "$SENDER" -a "$RECIPIENT" mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man maps_rbl_reject_code = 554 mydestination = website.com, $mydomain, $myhostname, localhost.$mydomain mydomain = mydomain.com myhostname = mydomain.com mynetworks = $config_directory/mynetworks myorigin = $mydomain newaliases_path = /usr/bin/newaliases non_fqdn_reject_code = 504 queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES relay_domains = proxy:mysql:$config_directory/mysql_relay_domains_maps.cf sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop show_user_unknown_table_name = no smtpd_hard_error_limit = 20 smtpd_helo_required = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = /var/spool/postfix/private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_soft_error_limit = 10 unknown_local_recipient_reject_code = 550 virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf virtual_gid_maps = static:89 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 89 virtual_transport = dovecot virtual_uid_maps = static:89
I don't use SELinux
TIA, John
Date: Tue, 16 Oct 2012 14:56:19 -0700 From: joseph85750@yahoo.com To: centos@centos.org Subject: Re: [CentOS] Sending Email Via Telnet
On Wed, Oct 17, 2012 at 8:40 AM, Blake Hudson blake@ispn.net wrote:
Alexander Dalloz wrote the following on 10/16/2012 1:41 PM:
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Alexander
Could SELinux be responsible?
If life gives you lemons, keep them-- because hey.. free lemons. "♥ Sticker" fixer: http://microflush.org/stuff/stickers/heartFix.html
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, Oct 16, 2012 at 5:26 PM, John Reddy linuxpencil@hotmail.com wrote:
relay_domains = proxy:mysql:$config_directory/mysql_relay_domains_maps.cf virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
I don't know much about postfix, but I think these settings mean that if mysql is down, postfix will hang. Is your mysql working?
Date: Tue, 16 Oct 2012 20:41:10 +0200 From: ad+lists@uni-x.org To: centos@centos.org Subject: Re: [CentOS] Sending Email Via Telnet
Am 16.10.2012 20:13, schrieb Les Mikesell:
]# netstat -pant|grep ":25"|grep LISTEN tcp 0 0 209.216.9.56:25 0.0.0.0:* LISTEN 14058/master tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14058/master
Something is clearly going wrong. Try 'strace -p 14058' (the process currently listening) in one window while you telnet in another.
Nothing prints.
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Here's some of the printout from that log:
Oct 16 10:36:19 mydomain postfix/master[14058]: warning: process /usr/libexec/postfix/proxymap pid 1438 exit status 1 Oct 16 10:36:19 mydomain postfix/master[14058]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling Oct 16 10:36:19 mydomain postfix/smtpd[26426]: warning: premature end-of-input on private/proxymap socket while reading input attribute name Oct 16 10:36:19 mydomain postfix/smtpd[26426]: warning: private/proxymap socket: service dict_proxy_open: Success Oct 16 10:36:19 mydomain postfix/master[14058]: warning: process /usr/libexec/postfix/proxymap pid 1439 exit status 1 Oct 16 10:36:19 mydomain postfix/cleanup[14062]: warning: premature end-of-input on private/proxymap socket while reading input attribute name Oct 16 10:36:19 mydomain postfix/cleanup[14062]: warning: private/proxymap socket: service dict_proxy_open: Connection reset by peer
TIA, John
Am 16.10.2012 23:46, schrieb John Reddy:
Before tracing anything (processes or network traffic) the OP should check the maillog. It for sure will the the truth about what is going on.
Here's some of the printout from that log:
Oct 16 10:36:19 mydomain postfix/master[14058]: warning: process /usr/libexec/postfix/proxymap pid 1438 exit status 1 Oct 16 10:36:19 mydomain postfix/master[14058]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling Oct 16 10:36:19 mydomain postfix/smtpd[26426]: warning: premature end-of-input on private/proxymap socket while reading input attribute name Oct 16 10:36:19 mydomain postfix/smtpd[26426]: warning: private/proxymap socket: service dict_proxy_open: Success Oct 16 10:36:19 mydomain postfix/master[14058]: warning: process /usr/libexec/postfix/proxymap pid 1439 exit status 1 Oct 16 10:36:19 mydomain postfix/cleanup[14062]: warning: premature end-of-input on private/proxymap socket while reading input attribute name Oct 16 10:36:19 mydomain postfix/cleanup[14062]: warning: private/proxymap socket: service dict_proxy_open: Connection reset by peer
TIA, John
Your other reply with the "postconf -n" output shows that you are running Postfix 2.3.3 which is coming with CentOS 5. Are you running precisely that version or the one from the centosplus repository?
The Postfix from CentOS 5 base does not support mysql as a valid map type! Thus it must fail when you specify maps of type mysql, as you do.
Regards
Alexander