Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jan 09, 2011 5:46 am 
Offline
Newbie

Joined: Sun Jan 09, 2011 5:34 am
Posts: 4
I have a forwarding rule with Postfix that forwards all messages to my main email address, not hosted on linode. When a spam message is sent to my linode-hosted address, it is forwarded but the sender is shown as being my linode domain, not the spammer's domain.

Real example:

admin@spammer.cn sends an email to info@mylinodedomain.com

the mail is forwarded to myemail@notlinode.com

my email hosting (notlinode.com) sees it's spam and sends a message to abuse@linode.com

Result: I received a message that a spam message was sent through my linode and my linode was powered down (TOS violation) since I wasn't around.

I have modified my postfix settings so I now use RBL, but if a message goes through, it may happen again.

How can I prevent this to happen again?
Is there some settings to change on Postfix so the original sender is correctly identified?

Thanks
Stephan


Top
   
PostPosted: Sun Jan 09, 2011 7:04 am 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
sburlot wrote:
I have a forwarding rule with Postfix that forwards all messages to my main email address, not hosted on linode. When a spam message is sent to my linode-hosted address, it is forwarded but the sender is shown as being my linode domain, not the spammer's domain.

Real example:

admin@spammer.cn sends an email to info@mylinodedomain.com

the mail is forwarded to myemail@notlinode.com

my email hosting (notlinode.com) sees it's spam and sends a message to abuse@linode.com

Result: I received a message that a spam message was sent through my linode and my linode was powered down (TOS violation) since I wasn't around.

I have modified my postfix settings so I now use RBL, but if a message goes through, it may happen again.

How can I prevent this to happen again?
Is there some settings to change on Postfix so the original sender is correctly identified?

Thanks
Stephan


The thing is that if you have a setup where mail is delivered to your linode and then forwarded somewhere else, the final destination will see the mail coming from your linode... simply because that's where it received the mail from.


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 8:53 am 
Offline
Senior Member

Joined: Sun Aug 02, 2009 1:32 pm
Posts: 222
Website: https://www.barkerjr.net
Location: Connecticut, USA
I think your email host needs to add some sort of trust on your node's IP. That way they will start their spam research on the IP before you.


Top
   
PostPosted: Sun Jan 09, 2011 8:59 am 
Offline
Newbie

Joined: Sun Jan 09, 2011 5:34 am
Posts: 4
hawk7000 wrote:
The thing is that if you have a setup where mail is delivered to your linode and then forwarded somewhere else, the final destination will see the mail coming from your linode... simply because that's where it received the mail from.


OK, but it should report the original sender also, no? I tested an email with spamcop.net and it doesn't recognize the original sender, just the forwarder.


Top
   
PostPosted: Sun Jan 09, 2011 9:02 am 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
sburlot wrote:
hawk7000 wrote:
The thing is that if you have a setup where mail is delivered to your linode and then forwarded somewhere else, the final destination will see the mail coming from your linode... simply because that's where it received the mail from.


OK, but it should report the original sender also, no? I tested an email with spamcop.net and it doesn't recognize the original sender, just the forwarder.


The headers have a trail of where the message has been passing through, but the headers can only really be trusted if you trust the server you got the message from. (That last statement can be applied recursively.)


Top
   
PostPosted: Sun Jan 09, 2011 9:46 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
sburlot wrote:
hawk7000 wrote:
The thing is that if you have a setup where mail is delivered to your linode and then forwarded somewhere else, the final destination will see the mail coming from your linode... simply because that's where it received the mail from.


OK, but it should report the original sender also, no? I tested an email with spamcop.net and it doesn't recognize the original sender, just the forwarder.

The problem is that every line of the Received: headers that are in the message could be a lie, from the perspective of the final receiving machine. They are very easily (and very commonly) forged, so we can't trust them.

The final receiving machine can only trust the IP address used to connect to it (and it puts that in the last Received: header; it's the only one the machine can trust because it wrote the line itself), nothing else.

In some cases it's possible to set up a "trust" where the machine can be told 'my linode is trusted', and then the machine could trust the Received line your linode writes out. But not many people bother to implement this. It's normally easier to whitelist your linode and so turn off the spam filter for messages relayed via your linode. You need to talk to your mail provider to work out how to do this.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 10:04 am 
Offline
Newbie

Joined: Sun Jan 09, 2011 5:34 am
Posts: 4
So it means that if a single spammer passes my anti-spam settings, my linode can be listed as a possible spammer and will be powered down because of a TOS violation?

How do you manage this case?


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 10:14 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
sburlot wrote:
So it means that if a single spammer passes my anti-spam settings, my linode can be listed as a possible spammer and will be powered down because of a TOS violation?

How do you manage this case?

1) Talk to the people you forward to; if they can't/won't accomodate you by whitelisting your linode then stop forwarding to them.

2) Talk to linode staff; they're people. They might be able to help. Note, however, that even if this is possible and linode won't power you down for this it could still end up with your linode on RBLs.

3) Run your mail service all yourself and don't forward elsewhere at all

4) Can the remote end be configured to pull from your machine (so you deliver mail local to your linode, then the remote service does a periodic pull - eg POP or IMAP) to collect the new messages.

Basically, forwarding mail is not a good thing to do in this modern spam-filled internet.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 10:29 am 
Offline
Newbie

Joined: Sun Jan 09, 2011 5:34 am
Posts: 4
Since I'm juggling with 2 linodes, I had the MX record incorrectly set.

Now parsing a forwarded email through spamcop.net correctly identify the original sender.

Anyway, the steps I did to try to solve are:
- Added RBL checking to postfix
- Added postgrey to postfix
- Correctly set the MX record

I will also try to contact my email hosting to see if they can whitelist my linode.

Thanks,
Stephan


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 12:49 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
You REALLY should stop trying to fix this and listen to everyone who is telling you it is simply a bad idea to be forwarding mail to a host you don't control.

No matter what you do at your end, you will end up forwarding some spam. Your server will then be held responsible for the messages, no matter what the received headers say about who supposedly originated the mail.

Also, if the receiving server is checking SPF then even legitimate mail you forward will look like spam unless you implement SRS.


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 11:13 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
I use virtual alias maps with Postfix to forward mail to my Gmail.

Code:
jeff@example.com jeff@gmail.com


Based on this discussion, sounds like that's a bad idea? And could lead to a TOS violation?


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 11:29 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
If you're worried about inadvertently sending a spam complaint to abuse@linode.com because you receive mail forwarded through your Linode, you might want to avoid sending automatic spam complaints.

Spam doesn't randomly jump out of a dark corner and hit you over the head with a frying pan; it is an e-mail message, and just as human intent was required to send it, human intent is required to properly react to it. Mail forwarding has been around since the time of Moses and is a widespread, normal practice. I'm not going to take drastic measures(*) because someone has the spare time to sit and fire off 50 spam complaints an hour, even less so if they entrust a computer with deciphering mail headers without bothering to tell it not to dump its sewage upstream of the village.

(*) Although I do re-envelope forwarded messages, such that the envelope sender is the forwarding machine's postmaster. Works around SPF and keeps downstream errors from befuddling senders.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Jan 09, 2011 11:32 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
So Google isn't going to send off a spam complaint to Linode?


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2011 9:23 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Probably not with this usage pattern, no.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Wed Jan 26, 2011 6:33 am 
Offline
Senior Newbie

Joined: Sat Dec 18, 2010 5:45 am
Posts: 11
jzimmerlin wrote:
I use virtual alias maps with Postfix to forward mail to my Gmail.

Code:
jeff@example.com jeff@gmail.com


Based on this discussion, sounds like that's a bad idea? And could lead to a TOS violation?


For some addresses I do something similar on my server with postfix, except I have it deliver to a local user account. The only thing in that user account is a .procmailrc file that runs it through spamassassin. All mail above 10 points is discarded, 5 points is quarantined, anything else is forwarded to the final address.

http://www.spamtips.org/
Spamassassin needs some add-ons and tuning to work to its full potential. My blog here documents all the best configurations and warns against typical mistakes.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group