Page 1 of 1
Does Swift include my IP even when using an external SMTP?
Posted: Sat Jan 03, 2009 12:31 pm
by alex.barylski
Well my subject should sum up the question...
Basically I am letting people send emails but they must use their own SMTP server...my host doesn't allow bulk email but if they get spam complaints they will likely shut down my account, not good.
My users are assumed legitimate but using their own SMTP alleviates me of much of the responsibility...obviously I would can anyone that broke the rules but I am hoping that if someone were to send SPAM using their own SMTP and just used my application as a conduit to manage emails, etc...
Can emails sent through SMTP XYZ be traced back to my application/server IP and thus potentially have me banned?
Cheers,
Alex
Re: Does Swift include my IP even when using an external SMTP?
Posted: Sat Jan 03, 2009 7:51 pm
by Chris Corbyn
Swift doesn't directly include your IP, but the receiving SMTP server MUST include your IP according to RFC 2821. All emails have a series of "Received:" headers at the start. Your IP should be the bottom one in that list since your IP is the first first one to send the email.
This isn't anything to do with Swift though, it's part of the SMTP specification.
Re: Does Swift include my IP even when using an external SMTP?
Posted: Sat Jan 03, 2009 8:01 pm
by Chris Corbyn
Basically RFC 2821 says that when SMTP software receives an email it MUST append a Received: header with at least (and optionally extra) this infomation:
The date/time at which the email was received.
The IP address of the connecting source (your App in the first instance).
Effectively you get a trace-route.
To pick out the Received headers in a random email sent to me:
Code: Select all
Received: by 10.210.125.14 with SMTP id x14cs753129ebc;
Fri, 2 Jan 2009 05:57:39 -0800 (PST)
Received: by 10.150.139.15 with SMTP id m15mr18048641ybd.158.1230904658328;
Fri, 02 Jan 2009 05:57:38 -0800 (PST)
Received: from n19.bullet.sp1.yahoo.com (n19.bullet.sp1.yahoo.com [69.147.64.216])
by mx.google.com with SMTP id n29si4872438elf.10.2009.01.02.05.57.36;
Fri, 02 Jan 2009 05:57:37 -0800 (PST)
Received: from [69.147.65.172] by n19.bullet.sp1.yahoo.com with NNFMP; 02 Jan 2009 13:57:35 -0000
Received: from [66.218.66.159] by t14.bullet.mail.sp1.yahoo.com with NNFMP; 02 Jan 2009 13:57:35 -0000
I can assume from this that 66.218.66.159 (m55.grp.scd.yahoo.com) sent the email. Sounds correct since the email originated from a Yahoo! Group.
Re: Does Swift include my IP even when using an external SMTP?
Posted: Sun Jan 04, 2009 2:36 pm
by alex.barylski
This isn't anything to do with Swift though, it's part of the SMTP specification.
Thanks for confirming that, I kind of figured that would probably happen, wasn't sure whether Swift did it or SMTP servers did...
Do you think then, that if I allowed users to send email using their own SMTP but using my software, I would potentially be tagged as a spammer or would the SMTP be at fault?
I know it sounds bad, but I just want to develop software and let people use my application. The politics in setting up an SMTP server and making sure you stay off black lists is crazy, and to much work for an independent developer as myself. I think I'll just host the software and turn a blind eye to spamming, although my software uses various techniques to check the email against spam filters (SpamAssassin) and if the email is flagged as spam it doesn't send, so SPAM should be minimized if not prevented outright, still...
Any opinion on the matter?
Re: Does Swift include my IP even when using an external SMTP?
Posted: Sun Jan 04, 2009 4:59 pm
by Chris Corbyn
I guess what you're really asking is if allowing other people to you use your server to send email is risky? It has an obvious answer really

Re: Does Swift include my IP even when using an external SMTP?
Posted: Sun Jan 04, 2009 5:02 pm
by Chris Corbyn
Look into using akismet for early spam trapping. Spamassassiin isn't great when used locally, but keep it in the filter chain anyway.
Re: Does Swift include my IP even when using an external SMTP?
Posted: Mon Jan 05, 2009 5:45 pm
by alex.barylski
What do you mean it's not effective locally?
In tests it's proven very accurate, so far, but I could be doing something wrong.
I am counting on the fact that SMTP servers themselves will have SpamAssassin and others installed, so sending through the SMTP server should filter a lot.
Re: Does Swift include my IP even when using an external SMTP?
Posted: Mon Jan 05, 2009 11:55 pm
by Chris Corbyn
When I tried to create a spamassassin plugin with it, the score margin was so incredibly small it became too hard to judge. I think SA might have just been too forgiving because it could tell that the mail hadn't actually arrived from the internet -- I might have just had it configured wrongly.
DSPAM is a good spam catching tool too.
Akismet is not made specifically for mail though... it's akismet that we can thank for a lot of wordpress blogs not being filled with spam (the ones that have the akismet plugin installed). It's built as a third-party hosted spam checking service for any purpose and it works really well. I'd certainly use akismet if I were to do something like this now (you don't need to have anything installed and it's free if you get an API key).