sendmail weird Local Delivery Problem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sendmail weird Local Delivery Problem
# 8  
Old 05-17-2012
Hi Again Guys,

Sorry to bump this thread but I'm not quite there yet. Sendmail is reporting that it should relay mail locally when it should be local - Great! The problem I have now seems to be that the content is simply not being written to file!

Code:
[root@server.domain.com mail]# sendmail -bvv localuser@server.domain.com
localuser@server.domain.com... deliverable: mailer local, user localuser

Code:
[root@server.domain.com mail]# /usr/lib/sendmail -v localuser@server.domain.com < /etc/motd
localuser@server.domain.com... Connecting to [127.0.0.1] via relay...
220 server.domain.com ESMTP Sendmail 8.13.1/8.13.1; Thu, 17 May 2012 11:51:52 +0100
>>> EHLO server.domain.com
250-server.domain.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@server.domain.com> SIZE=500 AUTH=root@server.domain.com
250 2.1.0 <root@server.domain.com>... Sender ok
>>> RCPT To:<localuser@server.domain.com>
>>> DATA
250 2.1.5 <localuser@server.domain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 q4HApqpn013077 Message accepted for delivery
localuser@server.domain.com... Sent (q4HApqpn013077 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.domain.com closing connection
[root@server.domain.com]#

I check the mail file under /var/spool/mail/ and there is nothing in it;

Code:
[root@server.domain.com mail]# pwd
/var/spool/mail
[root@server.domain.com]# ls -lash
total 31M
4.0K drwxrwxr-x   2 root        mail 4.0K Mar 23 13:53 .
4.0K drwxr-xr-x  16 root        root 4.0K Jun 11  2007 ..
   0 -rw-rw----   1 localuser   mail    0 Sep  5  2008 localuser

I'm I doing something really stupid here?

Disk space and free inodes are not a problem and I would guess that sendmail would return a "not enough disk space" error anyway if this was the problem...

Smilie

---------- Post updated at 12:39 PM ---------- Previous update was at 12:00 PM ----------

OK scratch the last comment as it appears as if mail appears to be sent locally when in fact it is still being relayed;

Code:
[root@server.domain.com ~]# /usr/lib/sendmail -v localuser@server.domain.com < /etc/motd ; tail -f /var/log/maillog
localuser@server.domain.com... Connecting to [127.0.0.1] via relay...
220 server.domain.com ESMTP Sendmail 8.13.1/8.13.1; Thu, 17 May 2012 12:28:41 +0100
>>> EHLO server.domain.com
250-server.domain.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@server.domain.com> SIZE=500 AUTH=root@server.domain.com
250 2.1.0 <root@server.domain.com>... Sender ok
>>> RCPT To:<localuser@server.domain.com>
>>> DATA
250 2.1.5 <localuser@server.domain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 q4HBSfEt003130 Message accepted for delivery
localuser@server.domain.com... Sent (q4HBSfEt003130 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.domain.com closing connection
May 17 12:28:41 server sendmail[3129]: q4HBSfAx003129: from=root, size=500, class=0, nrcpts=1, msgid=<201205171128.q4HBSfAx003129@server.domain.com>, relay=root@localhost
May 17 12:28:41 server sendmail[3130]: q4HBSfEt003130: from=<root@server.domain.com>, size=789, class=0, nrcpts=1, msgid=<201205171128.q4HBSfAx003129@server.domain.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
May 17 12:28:41 server sendmail[3129]: q4HBSfAx003129: to=localuser@server.domain.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30500, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4HBSfEt003130 Message accepted for delivery)
May 17 12:28:41 server sendmail[3132]: STARTTLS=client, relay=[IP OF REMOTE RELAY], version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-MD5, bits=128/128
May 17 12:28:41 server sendmail[3132]: q4HBSfEt003130: to=<localuser@server.domain.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120789, relay=[IP OF REMOTE RELAY] [IP OF REMOTE RELAY], dsn=2.0.0, stat=Sent (<201205171128.q4HBSfAx003129@server.domain.com> Queued mail for delivery)

[root@server.domain.com ~]# sendmail -bv localuser@server
localuser@server... deliverable: mailer local, user localuser
[root@server.domain.com ~]#

Smilie

---------- Post updated at 02:33 PM ---------- Previous update was at 12:39 PM ----------

Sorry Guys. I've finally got to the bottom of this. All I needed to do was restart sendmail!!!

Code:
[root@server.domain.com mail]# service sendmail restart
Shutting down sendmail:                                    [  OK  ]
Shutting down sm-client:                                   [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
[root@server.domain.com mail]#

The reason why I thought that you didn't need to restart the service was that the "sendmail -bv" test was returning the correct "local" delivery result when actually, if you sent local mail it was still being relayed.... DUMB!

Case Closed.
This User Gave Thanks to PACETREE For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Qmail mail delivery problem

Dear Concern, As per below article, we have configured qmail in our system. THE LINUX STUFF: qmail Installation Steps on Linux But when we try to send any mail in own domain, got below error message. Please advise. Apr 17 17:01:20 BLAUDITSCPTEST sendmail: alias database /etc/aliases... (0 Replies)
Discussion started by: makauser
0 Replies

2. Shell Programming and Scripting

Weird behavior of command "local"

Hi there, I'm running into a very weird situation. Let's forget about the purpose of my initial script please. I noticed the bug whatever I'm trying to do. I'm on an old server running bash 3.1.17. Say we have the following script : foo:~# cat /tmp/test #!/bin/bash f1() { local... (9 Replies)
Discussion started by: chebarbudo
9 Replies

3. Shell Programming and Scripting

Weird awk problem

Hi, I have a simple awk script: BEGIN{} { $a=$2-$1; print $a } END{if(NR==0){ print "0" } } to which I provide the following input 2.9 14 22.2 27 (4 Replies)
Discussion started by: jamie_123
4 Replies

4. SCO

Sendmail delivers mail to local user if it exists instead of passing it to the smart relay

Environment: SCO Unix Openserver 6 Sendmail ver: 8.11.3 I just put this server online replacing it's old counterpart, same OS on new machine. There are many different servers on this domain, windowssrv.thisdomain.com, oldunix.thisdomain.com, and the new newunix.thisdomain.com just to name a... (2 Replies)
Discussion started by: checkpro
2 Replies

5. UNIX for Advanced & Expert Users

Sendmail: how to restrict delivery based on "to" or "from"?

Hello, I manage a large sendmail server that handles more than 20,000 pieces of mail per day. It's a bit unusual in that all this mail is only being sent to and from 4 local accounts. (It's an automated transaction processing system, whereby users submit a transaction via email attachment). ... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies

6. Solaris

Weird crontab problem

Greetings To All! I am running Solaris 10 in a sparc environment. Here is the deal: In /var/spool/cron/crontabs, there is a cron user named "sys". If I do a crontab -l sys, it returns: # 0 * * * 0-6 /usr/lib/sa/sa1 # 20,40 8-17 * * 1-5 /usr/lib/sa/sa1 # 5 18 * * 1-5 /usr/lib/sa/sa2... (8 Replies)
Discussion started by: RobSand
8 Replies

7. Linux

local mail relay problem in Sendmail

I have a linux box. Sendmail is work fine in this box. The only problem I am facing is whenever I send mail using the mail command to the outside world or to root@localhost, I get this error - 127.0.0.1 localhost denied from relaying The command I used to send mail is - Ls -l | mail -s... (0 Replies)
Discussion started by: RajaRC
0 Replies

8. UNIX for Dummies Questions & Answers

Weird Problem???

I have a problem I don't understand... I am trying to declare a variable, and then output the results of that variable, couldn't be simpler #!/bin/ksh VAR='Oranges' if then echo "Found Lemons" elif then echo "Found Oranges" fi The output shouold clearly be "Found Oranges", but... (2 Replies)
Discussion started by: danhodges99
2 Replies

9. UNIX for Advanced & Expert Users

sendmail : connect local host (brocken)

hi there I've got a strange problem with a webserver box (suse linux 7.2). My MTA is sendmail, and when I tried manually send a mail. Sendmail -v "user@something" < /etc/hosts The Server tried "simon@localhost... Connecting to local..." but nothing happend and the system hold on. This... (3 Replies)
Discussion started by: mrsaint
3 Replies

10. Programming

Sendmail & mail.local + MySQL API

I've searched this message board, and the newgroups THOROUGHLY, in search of any information towards implenting the MySQL API with C... I'm a "beginner" to the C language I suppose, and i've made a few functions in C that can be implemented into the source code of Sendmail/mail.local, so that any... (2 Replies)
Discussion started by: CGrusden19
2 Replies
Login or Register to Ask a Question