Operating System - HP-UX
1748041 Members
5296 Online
108757 Solutions
New Discussion юеВ

Unix emails are all spam mail??

 
SOLVED
Go to solution
Cray
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., username@hotmail.com

And, the email is trapped to become spam trash.

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

rp5450:/#sendmail -v username@hotmail.com
subject: test

1234
.
username@hotmail.com... Connecting to mx4.hotmail.com. via esmtp...
220 bay0-mc8-f3.bay0.hotmail.com Sending unsolicited commercial or bulk e-mail t
o Microsoft's computer network is prohibited. Other restrictions are found at ht
tp://privacy.msn.com/Anti-spam/. Violations will result in use of equipment loca
ted in California and other states. Tue, 13 Jan 2009 05:11:57 -0800
>>> EHLO rp5450.somedomain.com
250-bay0-mc8-f3.bay0.hotmail.com (3.8.0.31) Hello [123.***.***.45]
250-SIZE 29696000
250-PIPELINING
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-AUTH LOGIN
250-AUTH=LOGIN
250 OK
>>> MAIL From: SIZE=20 AUTH=root@rp5450.somedomain.com
250 root@rp5450.somedomain.com....Sender OK
>>> RCPT To:
>>> DATA
250 username@hotmail.com
354 Start mail input; end with .
>>> .
250 <200901131311.n0DDBpVt019430@rp5450.somedomain.com> Queued mail for delivery
username@hotmail.com... Sent ( <200901131311.n0DDBpVt019430@rp5450.somedomain.com> Qu
eued mail for delivery)
Closing connection to mx4.hotmail.com.
>>> QUIT
221 bay0-mc8-f3.bay0.hotmail.com Service closing transmission channel
rp5450:/#
9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: Unix emails are all spam mail??

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

Hope this helps!
Regards
Torsten.

__________________________________________________
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!   
Cray
Frequent Advisor

Re: Unix emails are all spam mail??

The rp5450 have only private ip (192.168.1.xxx) 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.
Then:
$REPORT=/tmp/email_report
sudo /usr/sbin/sendmail mmcdonal << EOF
From: "UNIX REPORTING USER"
To: unix_team@work.com
Subject: "SOX REPORT FOR $SUBJECT"
Content-Type: text/html
`cat $REPORT`
EOF

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 root@rp5450.somedomain.com

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
Solution

Re: Unix emails are all spam mail??

Shalom,

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 systemname.mydomain.com 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.

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
VK2COT
Honored Contributor

Re: Unix emails are all spam mail??

Hello,

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:

http://www.mydigitallife.info/2007/08/08/how-to-check-test-and-validate-spf-record-in-dns-is-correct-and-valid/

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

# nslookup -type=txt hotmail.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
hotmail.com text = "v=spf1 include:spf-a.hotmail.com include:spf-b.hotmail.com include:spf-c.hotmail.com include:spf-d.hotmail.com ~all"

Or, even microsoft.com :)

# nslookup -type=txt microsoft.com
;; Truncated, retrying in TCP mode.
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
microsoft.com text = "v=spf1 mx include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com ip4:131.107.115.212 ip4:131.107.115.215 ip4:131.107.115.214 ip4:205.248.106.64 ip4:205.248.106.30 ip4:205.248.106.32 ~all"

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Bill Hassell
Honored Contributor

Re: Unix emails are all spam mail??

> The rp5450 have only private ip (192.168.1.xxx) 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??

Cray

Are you still having this issue?
Do you know about assigning points?
Cray
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.