Sendmail Name Lookup Issue

I am having some strange issues with sendmail at the moment.

When a mail comes into my sendmail server, where it is then relayed onwards, the sendmail server for whatever reason tries to forward it a hostname that it shouldn't.

Have no idea where it gets this hostname from in the first place as it should be sending it to a mail.full.domain.name server.

So my question is, does anyone exactly know how sendmail performs a hostname or DNS lookup and where it's cached. The strange thing is though that a restart of the sendmail service fixes this, yet it reappears sometimes, usually when we have some network issue in the back-end.

One would think that sendmail would clear its cache every few minutes. Or does it leverage something else to perform this lookup.


Similar Content



Sendmail Queries Part 2

Hi,

We are using Solaris 10 as sendmail gateway. We have just migrated our DNS recently. Now when a mail is sent, the system returned the following message:

# cat /etc/hosts | mailx -v <name>@<domain name>
<domain name>: Name server timeout
<name>@<domain name>... Transient parse error -- message queued for future delivery
<name>@<domain name>... queued

# mailq
/var/spool/mqueue is empty
Total requests: 0

I tried to stop/start sendmail but no luck to solve the problem.

Any pointer is appreciated. Thanks in advance.

Sendmail Is Not Working

Hi all,

I am trying to configure sendmail on my OEL 6.5 running on VM.

I did below to set it :

1. # yum install m4 telnet mailx
2. # yum install sendmail sendmail-cf
3. # ps -ef | grep -v grep | grep -i sendmail
root 3805 1 0 05:58 ? 00:00:00 sendmail: accepting connections
smmsp 3815 1 0 05:58 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

4. # netstat -an | grep :25 | grep tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

5. vi /etc/mail/sendmail.mc

From:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

To
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

6. # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

7. # service sendmail restart

8. # vi /etc/mail/local-host-names
oracle.com

Now if I am sending mail from 1 user (root) to other user (oracle)

$ mail -s "Test mail from root" oracle
Hello this is the test mail
.
EOT

and checking mail log under /var/mail/oracle, its passing successfully.

But when trying to send the same from root user to my company outlook account not gtting any mail.

mail -s "Test mail from root" abc.xyz@aaaa.com (trying to send to my outlook account)

Getting below error on /var/log/maillog :

May 13 10:47:47 mydb sendmail[6306]: t4DEllUD006306: from=oracle, size=244, class=0, nrcpts=1, msgid=<201505131447.t4DEllUD006306@mydb.oracle.com>, relay=root@localhost
May 13 10:47:47 mydb sendmail[6307]: t4DEllxo006307: from=<oracle@mydb.oracle.com>, size=506, class=0, nrcpts=1, msgid=<201505131447.t4DEllUD006306@mydb.oracle.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 13 10:47:47 mydb sendmail[6306]: t4DEllUD006306: to=abc.xyz@aaaa.com, ctladdr=oracle (600/601), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30244, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t4DEllxo006307 Message accepted for delivery)
May 13 10:47:49 mydb sendmail[6309]: STARTTLS=client, relay=mail1.nic.aaaa.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA, bits=256/256
May 13 10:47:50 mydb sendmail[6309]: t4DEllxo006307: to=<abc.xyz@aaaa.com>, ctladdr=<oracle@mydb.oracle.com> (600/601), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120506, relay=mail1.nic.aaaa.com. [192.240.6.6], dsn=2.0.0, stat=Sent (1uc8dar1s7-1 Message accepted for delivery)

Please suggest if something I missed out or any other problem

Thanks,

Sendmail Queries

Hi,

We have a sendmail gateway supported by Solaris 10.

Not sure when this had happened that mails are clogged in the queue and never send out. I have to run "sendmail -OTimeout.hoststatus=0m -q -v" manually to flush the queues.

Note that some mails are not able to deliver even I ran the command (sendmail -OTimeout.hoststatus=0m -q -v).

Any advise is appreciated. Thanks in advance.

New With Sendmail, Not Receiving Mail After Sending

I'm new to Sendmail and I want to be able to grab various stats from the Linux servers that I manage to monitor them.

Sendmail is running on my main Linux server and I can go thru the motions of sending an email to my MS Outlook client, which is what I use at work.

However I never get the email and if I check /var/spool/mqueue, I don't see any email queued up, and if I put a tail -f on /var/log/mail, this is what I'm seeing:

Code:
Feb  3 10:20:38 computername sendmail[31432]: t13GKcri031432: from=cmmiller, size=77, class=0, nrcpts=1, msgid=<201502031620.t13GKcri031432@mailserver.com>, relay=cmmiller@localhost
Feb  3 10:20:39 computername sendmail[31433]: t13GKcVO031433: from=<cmmiller@mailserver.com>, size=425, class=0, nrcpts=1, msgid=<201502031620.t13GKcri031432@mailsever.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb  3 10:20:39 computername sendmail[31432]: t13GKcri031432: to=myemailaddress@com, ctladdr=cmmiller (602/602), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30077, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t13GKcVO031433 Message accepted for delivery)
Feb  3 10:20:39 computername sendmail[31435]: t13GKcVO031433: to=<myemailaddress@com>, ctladdr=<cmmiller@mailserver.com> (602/602), delay=00:00:00, xdelay=00:00:00, mailer=smtp, pri=120425, relay=smtp.server. [192.138.40.216], dsn=2.0.0, stat=Sent (+OK message queued for delivery.)

Not sure what to troubleshoot here, and if anyone can point me to better information, thanks.

Send Mail Migration: Newbie

Hi,

We have a sendmail gateway supported by Solaris 10 server. How to go about if we would like to migrate the sendmail gateway to another Solaris 10 server?

Thanks in advance.

Sending Mail From Command Line

I searched the forums for my title and I am not finding exactly what I am looking for. I am not using a program to send mail, such as Thunderbird or whatever. I simply want to be able to send mail from my Ubuntu 14.04 DESKTOP version for logging. I use a program called Logwatch (used alot in RHEL or CentOS) to monitor the server itself. The program sends mail to the root user account on the machine, which I can check and see, and within the program conf file, I can add an external email address, but it never sends.

I'm familiar with the SMTP concept of sending mail, outgoing mail server authentication, etc. I don't care to run this box as an SMTP server, but I understand that I need some sort of SMTP or MTA program to send mail into the real world. I tried Postfix but couldn't get that to work, and the Logwatch program wants to use sendmail, so I installed that but I am having the same issue. I am sure it is a step I am missing.

I also can't figure out how to get the 'mail' cmd from Terminal to work. I use this command:
Code:
mail -s "test" | /usr/sbin/mail myemail@domain.com

it follows through the subject, CC, body, but when I try to hit either . or CTRL-D, it never sends the email, in fact is does nothing.

I also tried sendmail with this command:
Code:
sendmail -v my@email.com < /dev/null

I was just trying to send a test email. It logs into my SMTP mail server, which I already configured, and it tells me to type out the mail, then end with a "." by itself on a single line. I try this and it just sits there.

I am missing SOMETHING when trying to actually send the mail. I can get it written with subject and body, connected, but it never sends and I am probably missing a / or something.

I did find and follow these instructions, but it still isn't working with sendmail. If I need to go back to Postfix, I can do that, I don't honestly care what I use, I just want some programs such as Logwatch to be able to email me.
http://stackoverflow.com/questions/1...mail-on-ubuntu

Sendmail Alias Not Working

I'm trying to send all root's mails to an external e-mailaddress, but for some reason I can't get it to work.

I've edited /etc/aliases with the following rule:

root: <myexternal@email.address>

and run newaliasses after, which would run without any errors.

I can run: echo "Testing" | mail -s "Server Testing" <myexternal@email.address>
just fine without any issue and it's being delivered correctly to my external address.

But when I run: echo "Testing" | mail -s "Server Testing" root

I (first) get a "Deferred: 451 Temporary local problem - please try again later" error and when I then run: "Sendmail -OTimeout.hoststatus=0m -q -v" to flush the mailqueue it says everything is ok, but I then get a message saying I have new mail in /var/spool/mail/root and I don't get the mail on my external e-mailaddress.

I have no clue where to look next, hopefully you guys can point me in the right direction.

Just for completeness: I use mageia release 4 (x86_x64).

Restrict Sendmail To Send Emails To Only One Domain

Hi,

I am required to configure sendmail to be able to send emails to only two domains. Can some one help me with this. Thank you.

How To Configure Sendmail In Centos?

I need to send mails from our centos server, what are tools required ?

server
CentOS release 6.5 (Final)

How to check if sendmail is installed and configured?

I even tried mutt, I could install but not able to send mails. Is there any configuration required ?

Postfix Email Not Working In Oracle Linux

I have setup postfix in Oracle Linux VM in virtualbox to test simple email sends that I am sending it to my personal email.

I have configured the following in main.cf file

myhostname = abc.testserver.org
myorigin = $myhostname
inet_interfaces = localhost
#relayhost = localhost.localdomain - I have this commented as of now, but I tried with the localhost.localdomain, IP address and none worked. I also do not have my ISP's server details and I also do not want to use it.

I checked the /var/log/maillog and I see the following

Code:
May  4 17:25:37 oim sendmail[31684]: t44LPbKA031684: from=root, size=72, class=0, nrcpts=1, msgid=<201505042125.t44LPbKA031684@localhost.localdomain>, relay=root@localhost
May  4 17:25:37 oim sendmail[31685]: t44LPbSn031685: from=<root@localhost.localdomain>, size=378, class=0, nrcpts=1, msgid=<201505042125.t44LPbKA031684@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
May  4 17:25:37 oim sendmail[31684]: t44LPbKA031684: to=abc@abc.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30072, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t44LPbSn031685 Message accepted for delivery)


I can also see the messages in /var/spool/mqueue/. The telnet to the localhost 25 port also works. Is any of the config settings wrong?

Thanks.