Operating System - HP-UX
1833059 Members
2715 Online
110049 Solutions
New Discussion

a consultant firm could not get email from our Unix server

 
SOLVED
Go to solution
bin lu_1
Advisor

a consultant firm could not get email from our Unix server

We could not send email to a consultant firm, we got mailertable to point its mail server as a relay mailer
# cat mailertable
dtsoft.com relay:[mail.dtsoft.com]
# ps -ef | grep sendmail
root 16264 1 0 22:32:47 ? 0:00 sendmail: accepting connections on port 25
root 16549 8825 0 22:35:09 pts/ta 0:00 grep sendmail
root 16434 1 0 22:34:14 ? 0:00 sendmail: WAA16432 mail-v.dtsoft.com.: user open

The above last process looks some trouble somewhere.
also mailq -bp command got some mails queueing
10 REPLIES 10
Julio Yamawaki
Esteemed Contributor

Re: a consultant firm could not get email from our Unix server

Hi,

You must configure sendmail before sending anything:
1. Go to /etc/mail
2. Edit sendmail.cf and change the line with DS to DSmail.xxsoft.com
3. If you are using DNS, skip this step - Go to /etc and copy nsswitch.files to nsswitch.conf. Verify that you have a line like this: hosts: files
4. Stop sendmail: /sbin/init.d/sendmail stop
5. Start sendmail: /sbin/init.d/sendmail start
6. Test: sendmail -v xxx@yyy.com < /etc/issue and you will see if it´s working.

Regar
Rick Garland
Honored Contributor

Re: a consultant firm could not get email from our Unix server

In addition to sendmail.cf configuration, what about firewall settings? Could the firewall be blocking port 25 from some of the servers?

Geoff Wild
Honored Contributor

Re: a consultant firm could not get email from our Unix server

Did you configure sendmail to use mailertable? It is not on by default with HP-UX...

Setting up 'mailertable'

To set up 'mailertable', you need to edit your sendmail .mc file and add the following line:

FEATURE(`mailertable')

After doing this, you need to using the script supplied with the Sendmail source to rebuild your configuration file. (sh Build)

Now, open your new Sendmail configuration file and look for this (it should be in the first couple hundred lines of the file):

Kmailertable hash /etc/mail/mailertable


This defines where the 'mailertable' file should be, and in this case it is in /etc/mail.

Now let's go back to my previous example of being a secondary MX host for friendsdomain.com. If I wanted to do this with 'mailertable', I could add the following line to my /etc/mail/mailertable:

friendsdomain.com smtp:[mx1.friendsdomain.com]

After editing this file, you must create a database map of this file for Sendmail to read. Do this by running:

/usr/sbin/makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: a consultant firm could not get email from our Unix server

Diagnosis before the cure:

sendmail -v -d8.99 -d38.99 someone@some.net

type some text

.


This will provide you onscreen diagnostics that will help you spot the problem.

You can also do a tail -f on the mail.log file in /var/adm/syslog and see whats happening.

The solutions above are likely to help, but prior to implementing, knowing the exact problem might be useful.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
bin lu_1
Advisor

Re: a consultant firm could not get email from our Unix server

Thank you all discuss this here.

Last December, There are some destinated to dtsoft.com mails sent from this Unix server could not received by their inbox. But, we could not find mail queue or trouble symptom in Unix. Then, our Mail server (MS exchange) admin. and dtsoft people agree that we set up a mailertable in Unix, all destinate to dtsoft.com mail will bypass our mail server, directly sent to mail.dtsoft.com.

At that time, I setup and tested, working fine. I read the below forum at the time.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=556610

I will look for the specific note of my setup which is in my home PC, when it was night setup.

Now, I find out the mail.dtsoft.com port 25 is not open by using nmap.

But I checked our sendmail.cf
# grep DS sendmail.cf | grep -v "^#"
DSbogus.zzey.com

The above is our mail server. we use DNS in this Unix.

At this time, I just ask why mail.dtsoft.com does not get port 25 open. If it is always like that. I got to find out why this Unix could not send mail to dtsoft.com
Rick Garland
Honored Contributor

Re: a consultant firm could not get email from our Unix server

If the recipient does not have port 25 open to receive mail, not much you can do except tell them.
Geoff Wild
Honored Contributor

Re: a consultant firm could not get email from our Unix server

Looks like they are down:

# telnet mail.dtsoft.com 25
Trying...

Interesting thing is, mail.dtsoft.com is not listed in their MX records:

# dig dtsoft.com MX

; <<>> DiG named 9.2.0 <<>> dtsoft.com MX
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17245
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 6

;; QUESTION SECTION:
;dtsoft.com. IN MX

;; ANSWER SECTION:
dtsoft.com. 1200 IN MX 90 smtp.easydns.com.
dtsoft.com. 1200 IN MX 100 smtp2.easydns.com.
dtsoft.com. 1200 IN MX 10 smtp-a.dtsoft.com.
dtsoft.com. 1200 IN MX 20 smtp-b.dtsoft.com.

;; AUTHORITY SECTION:
dtsoft.com. 1158 IN NS ns1.easydns.com.
dtsoft.com. 1158 IN NS ns2.easydns.com.
dtsoft.com. 1158 IN NS remote1.easydns.com.
dtsoft.com. 1158 IN NS remote2.easydns.com.

;; ADDITIONAL SECTION:
smtp-a.dtsoft.com. 1200 IN A 67.102.179.53
smtp-b.dtsoft.com. 1200 IN A 67.102.179.54
ns1.easydns.com. 151059 IN A 216.220.40.243
ns2.easydns.com. 151059 IN A 205.210.42.20
remote1.easydns.com. 151059 IN A 64.39.29.212
remote2.easydns.com. 151059 IN A 212.100.224.80

;; Query time: 165 msec
;; SERVER: 156.44.162.125#53(156.44.162.125)
;; WHEN: Tue May 3 09:54:37 2005
;; MSG SIZE rcvd: 301


But is an alias:

# dig mail.dtsoft.com

; <<>> DiG named 9.2.0 <<>> mail.dtsoft.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64389
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;mail.dtsoft.com. IN A

;; ANSWER SECTION:
mail.dtsoft.com. 1133 IN CNAME mail-v.dtsoft.com.
mail-v.dtsoft.com. 1133 IN A 67.102.179.76

;; AUTHORITY SECTION:
dtsoft.com. 1133 IN NS ns1.easydns.com.
dtsoft.com. 1133 IN NS ns2.easydns.com.
dtsoft.com. 1133 IN NS remote1.easydns.com.
dtsoft.com. 1133 IN NS remote2.easydns.com.

;; ADDITIONAL SECTION:
ns1.easydns.com. 151034 IN A 216.220.40.243
ns2.easydns.com. 151034 IN A 205.210.42.20
remote1.easydns.com. 151034 IN A 64.39.29.212
remote2.easydns.com. 151034 IN A 212.100.224.80

;; Query time: 2 msec
;; SERVER: 156.44.162.125#53(156.44.162.125)
;; WHEN: Tue May 3 09:55:02 2005
;; MSG SIZE rcvd: 222


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
bin lu_1
Advisor

Re: a consultant firm could not get email from our Unix server

As before, if I use linux tools
dig mail.dtsoft.com
then
nmap mail.dtsoft.com
I could not find the pointed mail server port 25 open.

By the other method below
#dig dtsoft.com mx
;; ANSWER SECTION:
dtsoft.com. 1200 IN MX 90 smtp.easydns.com.
dtsoft.com. 1200 IN MX 100 smtp2.easydns.com.
dtsoft.com. 1200 IN MX 10 smtp-a.dtsoft.com.
dtsoft.com. 1200 IN MX 20 smtp-b.dtsoft.com.

;; ADDITIONAL SECTION:
smtp.easydns.com. 3599 IN A 205.210.42.52
smtp-a.dtsoft.com. 1199 IN A 67.102.179.53
smtp-b.dtsoft.com. 1199 IN A 67.102.179.54


I got totally different mail server names.

Now, I do not have setup mailertable mapping methed handy. As Geoff mentioned, I will do below.

1.
updated the mailertable to contents below
dtsoft.com relay:[smtp-a.dtsoft.com]
2.
Kmailertable hash /etc/mail/mailertable
3.
then, restart sendmail

Hope I understand you correctly.

Thank you all




Geoff Wild
Honored Contributor
Solution

Re: a consultant firm could not get email from our Unix server

That is correct - but I would confirm from your contacts at dtsoft which server to send mail to.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
bin lu_1
Advisor

Re: a consultant firm could not get email from our Unix server

our mailertable is working now.

dtsoft.com relay:[smtp-a.dtsoft.com]

but, if I put to two lines in mailertable, it will complain with duplicate dtsoft.com
when I use command
/usr/sbin/makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

dtsoft.com relay:[smtp-a.dtsoft.com]
dtsoft.com relay:[smtp-b.dtsoft.com]

This is not as good as resolv.conf, in which you could put more entries, in case first is not available, you could use next..
How could I make the second entries useful in mailertable?

And what are the differences of relay:(we use) and smtp: (Geoff previous comment) below

friendsdomain.com smtp:[mx1.friendsdomain.com]