Operating System - HP-UX
1748169 Members
4021 Online
108758 Solutions
New Discussion юеВ

Re: Send email using other domain

 
SOLVED
Go to solution
mir4take
Occasional Advisor

Send email using other domain

Hi Gurus,

We have configured sendmail in our system (HP-UX 11.11). However one user ask whether the system (hostname:mambo1) can send email with different user id (no-reply) and different domain (domainworld.com). I've configured at sendmail.cf along with userdb.db for represent the user id to other name. But for sending email with different domain, I cannot resolve the issue. I've edited masquerade entry at sendmail.cf as below: 

DMdomainword.com

 

When I try to send one email, it shows error as below:

 

mambo1:/etc/mail # echo Test | sendmail -v nick@starrex.com
WARNING: local host name (mambo1) is not qualified; see cf/README: WHO AM I?
nick@starrex.com... Connecting to smtp.ulala.net. via relay...
220 smtp2.ulala.com ESMTP Postfix
>>> EHLO mambo1
250-smtp2.ulala.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN CRAM-MD5 DIGEST-MD5 LOGIN
250-AUTH=PLAIN CRAM-MD5 DIGEST-MD5 LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> MAIL From:<user1@domainworld.com> SIZE=13 AUTH=no-reply@mambo1
250 2.1.0 Ok
>>> RCPT To:<nick@starrex.com>
>>> DATA
554 5.7.1 <user1@domainworld.com>: Sender address rejected: Access denied
554 5.5.1 Error: no valid recipients
>>> RSET
250 2.0.0 Ok
user1... Connecting to local...
user1... Sent
Closing connection to smtp.ulala.net.
>>> QUIT
221 2.0.0 Bye
mambo1:/etc/mail #
5 REPLIES 5
Matti_Kurkela
Honored Contributor
Solution

Re: Send email using other domain

Your sendmail is trying to send your test message to smtp.ulala.net, which is apparently an alias name for smtp2.ulala.com. When your sendmail is starting to send the message content, smtp2.ulala.com apparently runs some anti-relaying checks. Apparently as far as smtp2.ulala.com knows, domainworld, com is not part of the organization smtp2.ulala.com belongs to. So it looks like an "outsider" sender user1@domainworld.com is trying to send mail to an "outsider" recipient. This is not allowed by smtp2.ulala.com's anti-relaying rules, so it rejects the mail with a permanent (5xx) error  code.

 

To make this work, the email administrator of smtp2.ulala.com would have to configure smtp2.ulala.com to allow user1@domainworld.com to relay mail through it. Apparently relaying is currently allowed for your normal usernames/domain only.

 

In general, the anti-relaying rules usually work like this:

  • anyone can connect to the mail server owned by organization X, but they can only use it to send mail to members of organization X
  • members of organization X can use their organization's mail server to send mail to any recipient in the world
  • the mail server can identify the members of its own organization by various ways: the simplest is to verify that the request comes from the organization's in-house network, but authentication can be used for that too. The "250-AUTH PLAIN CRAM-MD5 DIGEST-MD5 LOGIN" line lists the authentication schemes supported by smtp2.ulala.com.

If smtp2.ulala.com is configured to relax its relaying restrictions when the user is authenticated and you have the necessary username&password, you might be able to configure your sendmail to use authentication when communicating with smtp2.ulala.com. See http://www.sendmail.org/~ca/email/auth.html, chapter "Using sendmail as a client with AUTH". Note that this may require generating a new sendmail.mc file; on HP-UX, the tools for that are available in /usr/newconfig/etc/mail/cf, and a special HP-UX template .mc file should be used as a base.

 

NOTE: although this is not quite the "sendmail wizardry" of the old days, this qualifies as a rather advanced Sendmail configuration, and may not be supported by HP.

 

The template .mc file for the standard HP-UX sendmail.cf is at /usr/newconfig/etc/mail/cf/cf/generic-hpux10.mc. See the HP-UX specific instructions in /usr/newconfig/etc/mail/cf/README.hpux10 file. (Yes; at least on HP-UX 11.23, this documentation is essentially unchanged from the times of HP-UX 10.xx).

MK
Steven E. Protter
Exalted Contributor

Re: Send email using other domain

Shalom,

 

554 5.7.1 <user1@domainworld.com>: Sender address rejected: Access denied
554 5.5.1 Error: no valid recipients

The user does not exist on the domain.

 

You are either not really accessing the domain or using an invalid user.

 

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
Steven Schweda
Honored Contributor

Re: Send email using other domain

 
mir4take
Occasional Advisor

Re: Send email using other domain

Thanks Matti for your details explanation :) I really2x appreciate it!

mir4take
Occasional Advisor

Re: Send email using other domain

It just a example, Steven Schweda. Why should I put real information here as long as the point is understand by others? Anway I've already get the answer from Matti who understand my situation :)