Sponsored Content
Top Forums UNIX for Dummies Questions & Answers sendmail weird Local Delivery Problem Post 302635019 by PACETREE on Friday 4th of May 2012 06:18:40 AM
Old 05-04-2012
sendmail weird Local Delivery Problem

Hi Guys,

Just joined the forum though I have been lurking here for many years now.

Wondering if anyone can help me out with a problem that I'm currently having. Smilie

I have a few servers that are relaying all email off of the box to an exchange server. There is a SmartHost configured in sendmail.cf

The problem is, is that it relaying ALL emails, even the emails bound for local users. I have another box which is working correctly and only relaying "external" email. I have checked though and compared the sendmail.cf, submit.cf (not in use), domaintable, access and local-host-names as well as the /etc/hosts and /etc/aliases file and they all appear to be identical in both cases.

I've thought that it could be some issue with the /etc/hosts as on the broken server it has several entries for itself pointing it's own IP address;

IP ADDRESS broken_server.domain.com

On the working Server these entries are not present so I decided to replicate the local IP address entries on the working server in the hope that this would break it in the same fashion. It didn't.

I've been toying with the idea of using the -

Code:
Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names

and/or the Class L -

Code:
# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{w}localhost.localdomain

.... to try and put a "sticking plaster" on the situation but would like to understand the odd behaviour if possible.


Working Server

[root@working_server.domain.com mail]# sendmail -bvv username
username... deliverable: mailer local, user username

[root@working_server.domain mail]# sendmail -bvv username@working_server
username@working_server... deliverable: mailer local, user username

[root@working_server.domain mail]# sendmail -bvv username@working_server.domain.com
username@working_server.domain.com... deliverable: mailer local, user username

[root@working_server.domain mail]# sendmail -bvv username@remote_domain.com
username@endava.com... deliverable: mailer relay, host [MAIL_RELAY IP ADDRESS], user username@endava.com



Not Working - Should keep all of these emails local

[root@broken_server.com.domain mail]# sendmail -bvv username
username... deliverable: mailer local, user username
Fine

[root@broken_server.domain.com mail]# sendmail -bvv username@localhost
username@localhost... deliverable: mailer local, user username
Fine

[root@broken_server.domain.com mail]# sendmail -bvv username@localhost.localdomain
username@localhost.localdomain... deliverable: mailer local, user username
Fine

[root@broken_server.domain.com mail]# sendmail -bvv username@broken_server
username@broken_server... deliverable: mailer relay, host [MAIL_RELAY IP ADDRESS], user username@broken_server.domain.com
Borked

[root@broken_server.domain.com mail]# sendmail -bvv username@broken_server.domain.com
username@broken_server.domain.com... deliverable: mailer relay, host [MAIL_RELAY IP ADDRESS], user username@broken_server.domain.com
Borked


Any ideas gents?

Last edited by PACETREE; 05-04-2012 at 10:55 AM..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy