Showing results for 
Search instead for 
Did you mean: 

Send email using other domain

Go to solution
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 ( I've configured at 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 as below:


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


mambo1:/etc/mail # echo Test | sendmail -v
WARNING: local host name (mambo1) is not qualified; see cf/README: WHO AM I? Connecting to via relay...
220 ESMTP Postfix
>>> EHLO mambo1
250-SIZE 10240000
250 DSN
>>> MAIL From:<> SIZE=13 AUTH=no-reply@mambo1
250 2.1.0 Ok
>>> RCPT To:<>
>>> DATA
554 5.7.1 <>: 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
>>> QUIT
221 2.0.0 Bye
mambo1:/etc/mail #
Honored Contributor

Re: Send email using other domain

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


To make this work, the email administrator of would have to configure to allow 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

If 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 See, chapter "Using sendmail as a client with AUTH". Note that this may require generating a new 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 is at /usr/newconfig/etc/mail/cf/cf/ 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).

Exalted Contributor

Re: Send email using other domain



554 5.7.1 <>: 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.



Steven E Protter
Owner of ISN Corporation
Honored Contributor

Re: Send email using other domain

Occasional Advisor

Re: Send email using other domain

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

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 :)