System Administration
Showing results for 
Search instead for 
Did you mean: 

Unix emails are all spam mail??

Go to solution
Frequent Advisor

Unix emails are all spam mail??

I have a rp54 server running HP-UX 11i v1, and use sendmail to send email to specific user in internet. e.g.,

And, the email is trapped to become spam trash.

It's not a spam, so how to fix the problem. THX.

rp5450:/#sendmail -v
subject: test

. Connecting to via esmtp...
220 Sending unsolicited commercial or bulk e-mail t
o Microsoft's computer network is prohibited. Other restrictions are found at ht
tp:// Violations will result in use of equipment loca
ted in California and other states. Tue, 13 Jan 2009 05:11:57 -0800
>>> EHLO ( Hello [123.***.***.45]
250-SIZE 29696000
250 OK
>>> MAIL From: SIZE=20
250 OK
>>> RCPT To:
>>> DATA
354 Start mail input; end with .
>>> .
250 <> Queued mail for delivery Sent ( <> Qu
eued mail for delivery)
Closing connection to
>>> QUIT
221 Service closing transmission channel
Acclaimed Contributor

Re: Unix emails are all spam mail??

If the sender is really "" it is possibly on a black list ... but you can try to mark it as "safe sender" in your email program.

Hope this helps!

There are only 10 types of people in the world -
those who understand binary, and those who don't.

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Frequent Advisor

Re: Unix emails are all spam mail??

The rp5450 have only private ip ( and connects to internet through ADSL router (NAT). Is it the problem?
Mark McDonald_2
Trusted Contributor

Re: Unix emails are all spam mail??

I have a similar problem - I have just created rules in the mailbox. The problem for me seems to be that the mail client recognises:

root@server etc to be spam. Can you add a MIME header to the outgoing mail?

I have an example of what I use:

The script creates a html report with red highlights to high usage file systems etc.
sudo /usr/sbin/sendmail mmcdonal << EOF
Content-Type: text/html
`cat $REPORT`

user mmcdonal is set to forward to the team email addresses in /etc/aliases file.

Just google the MIME headers, to see whatelse you may need.

I had another issue when using the group email address, the exchange server stripped out my mime headers and made the report in to an attachement when expandid the group list. Just something to think about.
Elmar P. Kolkman
Honored Contributor

Re: Unix emails are all spam mail??

Easiest way to solve this, is to configure sendmail to send mail as:
rp5450@ instead of

The problem is that a lot of mailservers don't accept mail as valid, if the reply/sender address is not resolvable.
Every problem has at least one solution. Only some solutions are harder to find.
Steven E. Protter
Exalted Contributor

Re: Unix emails are all spam mail??


No, it has nothing to do with Unix that makes hotmail decide its spam.

It has to do with a few factors:

1) The domain name of the server in the sendmail configuration. This you can change.
2) The DNS infrastructure, what domain it is, does the reverse lookup address match the sending domain.

hotmail is the target of literally billions of spam messages per day. One way to dramatically cut down on the incoming volume is to disallow improperly marked mail.

If you really need to send to this service then you need to build a little DNS infrastructure around the sending IP address, the public IP address your mail is jumping on the Internet at. This can be done even with a simple home Internet connection. Reverse Lookup has to be arranged by the ISP.

Examples help here. If I send mail from and that domain can not be looked up on a public DNS server, then most major mail systems will reject it. Domain name doe not match known record, sorry spammer go home.

Deal with all these checklists and your mail will get delivered.

So it has nothing to do with Unix per say, it has to do with two major factors, sendmail setup, easily changed, and DNS infrastructure, not so easily done but definitely possible.

Steven E Protter
Owner of ISN Corporation
Honored Contributor

Re: Unix emails are all spam mail??


No doubt, the DNS is the issue:

a) Check A- and PTR- resource records for your
mail gateway;

b) Check MX- resource records for your domain name (that one that should be visible on Internet);

c) Add SPF (Hotmail checks it). Sender
Policy Framework (SPF) record in the domain
DNS tree level is a relatively new tool to
decrease email spam that trying to forge or
spoof sender SMTP MAIL FROM and Return-Path
from your domain. It is a dubious fix, but
anyway, some companies rely on it.

Here is how you can test if your SPF is OK:

Here is an example for I just
ran on my own DNS servers:

# nslookup -type=txt

Non-authoritative answer: text = "v=spf1 ~all"

Or, even :)

# nslookup -type=txt
;; Truncated, retrying in TCP mode.

Non-authoritative answer: text = "v=spf1 mx ip4: ip4: ip4: ip4: ip4: ip4: ~all"


VK2COT - Dusan Baljevic
Bill Hassell
Honored Contributor

Re: Unix emails are all spam mail??

> The rp5450 have only private ip ( and connects to internet through ADSL router (NAT). Is it the problem?

Yes, this is the problem. *ALL* 192.168... addresses are local and do not appear on the Internet. The NAT feature takes your local address and translates it to your external router address. But that address won't have a name so DNS lookup by Hotmail, Gmail, and all corporate mail systems can't find your hostname or your IP address so it is rejected -- as it should be since this is how spammers start. You can't change your IP address and you won't be able to create an acceptable domainname attached to your IP address.

You need to rewrite your local email address to something is acceptable on the Internet (as mentioned above). If you are part of company with an email server, relay your email through that server and depending on the server, you may get your email headers rewritten with your coporate address.

However, setting up to accept incoming email back to your server may also be a fairly complex job. And all of this requires scrutiny for security issues. For example, sending information about the configuration of your system by email should always be blocked from ever leaving your company without encryption.

If this is a very simple setup in a home or small business, talk to your ISP about getting a valid domain name with a managed DNS record, specifically, the MX records. They should have good instructions on how to use this service.

Bill Hassell, sysadmin
Mark McDonald_2
Trusted Contributor

Re: Unix emails are all spam mail??


Are you still having this issue?
Do you know about assigning points?
Frequent Advisor

Re: Unix emails are all spam mail??

I will try DNS solution. And, no doubts I will give points to everyone soon. THX all.