LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-03-2009, 07:27 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 620

Rep: Reputation: 33
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=

Last edited by jonaskellens; 07-03-2009 at 07:30 AM.
 
Old 07-04-2009, 04:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 07-10-2009, 04:44 AM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 620

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by acid_kewpie View Post
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...

Last edited by jonaskellens; 07-10-2009 at 04:49 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail to root but it send to other email smart_jija Solaris / OpenSolaris 5 07-01-2009 01:33 AM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 08:33 AM
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM


All times are GMT -5. The time now is 10:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration