1830453 Members
2242 Online
110004 Solutions
New Discussion

sendmail smtp problem

 
SOLVED
Go to solution
Christopher Little_2
Frequent Advisor

sendmail smtp problem

I am trying to have sendmail forward all outbound SMTP mail to our corporate smtp server. This smtp server will only accept message from valid users. My account on the HP-UX system is named littlch1 whereas my mail account is christopher.little. Is there a way to fool the smtp server that my account name is christopher.little?

Chris
14 REPLIES 14
Geoff Wild
Honored Contributor

Re: sendmail smtp problem

Don't know if this will help, but have you tried the DM macro in sendmail.cf?

# who I masquerade as (null for no masquerading) (see also $=M)
DMnameofcorpsmtpserver


Also set the DS macro:


# "Smart" relay host (may be null)
DSnameofcorpsmtpserver



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.
Jim Mallett
Honored Contributor

Re: sendmail smtp problem

I ran into a similar problem a while ago when our Network Admins locked down our Exchange server because of some spoofing issues.

I had them manually add my IP addresses to their Exchange server and allow message relaying for me. As soon as they did, I was able to mail from any Unix account.

Hope this helps...
Jim
Hindsight is 20/20
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

DS was already set.

Setting DM made the smtp server think that I was littlch1@christopher.little. Different error but still didn't go.

Chris
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

I wish I could get them to make a change to the smtp server but that would be about as successful as asking them to turn night into day :-) Thanks though.

Chris
Geoff Wild
Honored Contributor

Re: sendmail smtp problem

sorry - DM should be your domain name - not server name.

DMyourdomain.com

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.
Geoff Wild
Honored Contributor

Re: sendmail smtp problem

After checking some more, what you need to do is add your id's to /etc/mail/aliases:

littlch1: christopher.little@yourdomian.com

Then run newaliases

Then restart sendmail...


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.
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

Setting DM to the mail domain name had no impact.

I already had the alias set up in the manner suggested.

Chris
Geoff Wild
Honored Contributor

Re: sendmail smtp problem

what happens when you try this:

telnet yourcorpsmtpserver 25
helo yourdomain.com
mail from: christopher.little
rcpt to: christopher.little
data
test
.
.




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.
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

after mail from: christopher.little I get:

553 christopher.little... Domain name required

If I put in my full e-mail address it works fine.
Geoff Wild
Honored Contributor

Re: sendmail smtp problem

okay - so the telnet works...what about:

mailx -s "test" christopher.little@yourdomain.com
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.
Armin Kunaschik
Esteemed Contributor
Solution

Re: sendmail smtp problem

Try using the generics table feature of sendmail:

uncomment the generics line in /etc/mail/sendmail.cf

Kgenerics dbm -o /etc/mail/genericstable

and the apropriate rules (in S93, see "# handle generics database")

Add a CG entry with your FQDN-hostname e.g.:
CGmyhost.wherever

Then create the generics table entries:
littlch1 christopher.little@somedomain.com
root master@bofh.com

Finally build the generics db file:
makemap dbm /etc/mail/genericstable
and then everything should (hopefully) work...

PS: don't forget to set DS to the name of your mailhub...
And now for something completely different...
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

BINGO!! The generics entries did the trick. It's now sending through our corporate relay. You're a genius Armin!

I've not got another problem. As this system only has a connection to internal DNS, it won't resolve domain names for internet addresses. Can't I just tell sendmail to not worry about the recpient's address and have the relay resolve it?

Thanks again Armin, and everybody else for your help so far.

Chris
Christopher Little_2
Frequent Advisor

Re: sendmail smtp problem

BINGO!! The generics entries did the trick. It's now sending through our corporate relay. You're a genius Armin!

I've now got another problem. As this system only has a connection to internal DNS, it won't resolve domain names for internet addresses. Can't I just tell sendmail to not worry about the recpient's address and have the relay resolve it?

Thanks again Armin, and everybody else for your help so far.

Chris
Armin Kunaschik
Esteemed Contributor

Re: sendmail smtp problem

Hi,

I'm not sure about this issue.
I'm using the default HP-UX sendmail.cf with
just DS set and generics table enabled.
DNS works only for internal addresses.
sendmail accepts mail from local to all external
addresses by default.
Can you post the error message (from syslog) and
maybe your sendmail.cf?

Armin
And now for something completely different...