LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Msmtp on CentOS 5.2 : cannot send mail (http://www.linuxquestions.org/questions/linux-newbie-8/msmtp-on-centos-5-2-cannot-send-mail-737455/)

jonaskellens 07-03-2009 07:27 AM

Msmtp on CentOS 5.2 : cannot send mail
 
It should be possible to send mail with Msmtp.

Code:

[root@asterisk ~]# ls -l /usr/local/bin/msmtp
-rwxrwxrwx 1 root root 274806 May  4 19:23 /usr/local/bin/msmtp
[root@asterisk ~]# ls -l msmtplogfile
-rw-r--r-- 1 root root 0 Jul  3 14:06 msmtplogfile
[root@asterisk ~]# /usr/local/bin/msmtp jonas.kellens@telenet.be --logfile=/root/msmtplogfile

[1]+  Stopped                /usr/local/bin/msmtp jonas.kellens@telenet.be --logfile=/root/msmtplogfile
[root@asterisk ~]# service iptables status
Firewall is stopped.
[root@asterisk ~]# cat msmtplogfile

I want to send a mail to jonas.kellens@telenet.be and explicitly specify the logfile to log errors... but sending fails (it takes forever and finally I stop the proces) and the logfile is empty.

I want to find out why sending with msmtp fails, but when there is no logging I'm with my back against the wall.

Has anyone an idea ?

Extra info :

Code:

[root@asterisk ~]# cat /root/.msmtprc
# Set default values for all following accounts.
defaults
logfile ~/.msmtp.log

# The SMTP server of the provider.
account default
host uit.telenet.be
user XXXXXXXXXXX
password XXXXXXXXXXXXXX
from jonas.kellens@telenet.be

I know I have a logfile in my defaults-configuration, but nothing is written to it. Therefore I have specified one with --logfile=

acid_kewpie 07-04-2009 04:54 PM

Never used msmtp myself, but if you run "tcpdump -vnX port 25 eth0" assuming eth0 is your outbiund nic, then you'll see the SMTP conversation, if there is one, which would tell you a lot about either exactly what the problem is, or localise it somewhat.

jonaskellens 07-10-2009 04:44 AM

Quote:

Originally Posted by acid_kewpie (Post 3596860)
Never used msmtp myself, but if you run "tcpdump -vnX port 25 eth0" assuming eth0 is your outbiund nic, then you'll see the SMTP conversation, if there is one, which would tell you a lot about either exactly what the problem is, or localise it somewhat.

tcpdump doesn't show much...
Code:

[root@asterisk asterisk]# tcpdump -vnX port 25 -i eth1
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes

0 packets captured
0 packets received by filter
0 packets dropped by kernel


But debugging the msmtp-command itself shows this :

Code:

[root@asterisk asterisk]# /usr/bin/msmtp -d jonas.kellens@telenet.be
ignoring system configuration file /usr/etc/msmtprc: No such file or directory
loaded user configuration file /root/.msmtprc
using account default from /root/.msmtprc
host                  = uit.telenet.be
port                  = 25
timeout              = off
protocol              = smtp
domain                = localhost
auth                  = none
user                  = my_user_name
password              = *
ntlmdomain            = (not set)
tls                  = off
tls_starttls          = on
tls_trust_file        = (not set)
tls_crl_file          = (not set)
tls_key_file          = (not set)
tls_cert_file        = (not set)
tls_certcheck        = on
tls_force_sslv3      = off
tls_min_dh_prime_bits = (not set)
tls_priorities        = (not set)
auto_from            = off
maildomain            = (not set)
from                  = jonas.kellens@telenet.be
dsn_notify            = (not set)
dsn_return            = (not set)
keepbcc              = off
logfile              = /root/.msmtp.log
syslog                = (not set)
reading recipients from the command line
<-- 220 georges.telenet-ops.be bizsmtp ESMTP server ready
--> EHLO localhost
<-- 250-georges.telenet-ops.be hello [78.21.41.171], pleased to meet you
<-- 250-HELP
<-- 250-SIZE 10485760
<-- 250-ENHANCEDSTATUSCODES
<-- 250-8BITMIME
<-- 250 OK
--> MAIL FROM:<jonas.kellens@telenet.be>
<-- 250 2.1.0 <jonas.kellens@telenet.be> sender ok
--> RCPT TO:<jonas.kellens@telenet.be>
<-- 250 2.1.5 <jonas.kellens@telenet.be> recipient ok
--> DATA
<-- 354 enter mail, end with "." on a line by itself

and then it stays that way...


All times are GMT -5. The time now is 07:44 AM.