Operating System - HP-UX
1821051 Members
2963 Online
109631 Solutions
New Discussion юеВ

Re: sendmail - masquerading with no dns problem

 
Emanuele_4
Regular Advisor

sendmail - masquerading with no dns problem

Hi everybody, I've a problem with sendmail.

I have to send mail to an external mail server (smtp.it.XXXX.com) but this server can accept only mail from YYYY@XXXX.com.

All our UX server send mail with sendmail like YYYY@hostname.XXXX.com so...we're not able to send mail.

So far I did:

1) sendmail.cf
DMXXXX.com
Dj$w.XXXX.com
CE commented

2) Restarted sendmail
3) verified with sendmail -v zzzz@XXXX.com
i Got:
HOSTNAME:/etc/mail# sendmail -v pippo.baudo@XXXX.com
XXXX.com: Name server timeout
pippo.baudo@XXXX.com... Transient parse error -- message queued for future delivery

4) verified nnswitch.conf which contains:
hosts: files dns
5) file resolv.conf not present because we ar not using dns but only hosts file.

in host file we have every server...and the smtp server too. I can ping smtp.it.XXXX.com from everywhere thanks to hosts file.

I think the problem is about the fully qualified name...or the XXXX.com which is not known from the server...

Does anybody have an idea?
Thanks in advance

7 REPLIES 7
RAC_1
Honored Contributor

Re: sendmail - masquerading with no dns problem

Did you try as follows.

mailx -s "Subject" -r "YYYY@XXXX.com" "to_adress"

also you may want to try -f option of sendmail so that mail sent looks like it is sent from YYYY@XXXX.com

Anil
There is no substitute to HARDWORK
Emanuele_4
Regular Advisor

Re: sendmail - masquerading with no dns problem

I tried your command but it seems that it's not working fine:

after the command I run mailq and find out:

j0BDFdw14181 0 Tue Jan 11 14:15 ema@XXXX.com
(host map: lookup (XXXX.com): deferred)
pippo.baudo@XXXX.com

The command was:
mailx -s "prova mailx" -r "ema@XXXX.com" "pippo.baudo@XXXX.com" < file
Mark Greene_1
Honored Contributor

Re: sendmail - masquerading with no dns problem

Verify your sendmail.cf setup with:

mailq -d -v

(the domain info will be at the end of the display)

Then try this to get better debug info:

sendmail -v -d0 -d1 -d0.4 -d1.5 -d2 -d6 -d6.5 -d10 -d11 -d30 -d45 pippo.baudo@XXXX.com maildebug.log 2>&1


make sure to have the "testmail" file created with something to send, and do this from a directory with sufficient space to create the maildebug.log file; it may be as much as a couple of meg.

mark
the future will be a lot like now, only later
Sanjay_6
Honored Contributor

Re: sendmail - masquerading with no dns problem

Hi,

Reset your sendmail configuration to what it was before and then try Anil's suggestion,

mailx -s "Subject" -r "YYYY@XXXX.com" "to_adress"

Here YYYY@XXXX.com is a vaild email address, could be your own official email address. and XXXX.com is a valid domain.

Hope this helps.

Regds
Steven E. Protter
Exalted Contributor

Re: sendmail - masquerading with no dns problem

Suggestion:
hostname.XXXX.com

Make it a valid DNS entry in your DNS server that is pointed to in /etc/resolv.conf

Create the server on the UX box and add DNS re cords to support your environment. You need not change nsswitch.conf

Then the mail will get delievered.

You could also use smtp relay in sendmail.cf

DShostname.relayserver.com

or

DS
[ip address]

save sendmail.cf

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

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
Emanuele_4
Regular Advisor

Re: sendmail - masquerading with no dns problem

thank you very much for your suggestion...I think we are getting closer to resolv the problem.

The log file is in attach but I'm thinking there could be a problem with the Dj parameter in the sedmail.cf file.

I have
Dj$w.domain.com
where I think $w is the hostname

so I already tried to put
Djdomain.com
but it doesn't work
Mark Greene_1
Honored Contributor

Re: sendmail - masquerading with no dns problem

Coment the Dj entry. You only need to have the correct IP and host name and fully qualified host name in your /etc/hosts file and sendmail should derive all that just fine.

mailq -v -d to verify once you've made the changes.


mark
the future will be a lot like now, only later