Catch All Pop3 Account

Sep 2, 2009 at 9:29 PM

Hey Daniel,

Firstly, nice project!

Quick question.  How can I configure P3SS to forward email from a catch-all pop3 mailbox and allow Exchange to do the mail sorting?

Here's the deal:

I've a domain registered that is configured to forward all email (eg <anything>@domain.com) to a gmail account.  From there I would like to use P3SS to pull the email (via pop.gmail.com) and pass it to my Exchange server, allowing the exchange server to sort out which email goes to which recipient.

At the moment, all email (irrespective of recipient addresses embedded in each email) is being forwarded to which ever account I configure in the "Email to Forward to" config box.  What do I put in the "Email to Forward to" config box to make P3SS read and forward to the recipient embedded in each email?

I know this is possible, with my current set up, (as in the recipient data is intact in the individual emails) as up to now I've been using popcon to complete this task.  However, for a variety of reasons, I would like to move away from popcon and use P3SS instead.

Any ideas?

Cheers

- Chris

Coordinator
Sep 3, 2009 at 5:16 AM

I'll add it as a todo feaure.

So it will have an option to look in the headers for a 'To' header, and then it forwards to that.

 - Daniel

Coordinator
Sep 3, 2009 at 8:15 AM

Added to Work Item 2534

Sep 3, 2009 at 1:14 PM

Hey Daniel,

Nice one, thanks!

- Chris

Sep 3, 2009 at 5:30 PM
Edited Sep 3, 2009 at 5:32 PM

Hey Daniel,

OK, had a spin at compiling Change Set 25400\features branch under Visual C# 2008 Express (first time I've tried a compile) and all appeared to compile OK. 

Quick config tweak to activate feature and kicked off a download of 4 emails from Gmail. All four ended up in the correct mail boxes.  Nice one!!

Had a quick look in the event log (Debugging ticked) and noticed the following:

Error ID 302, Source P3SS:

Account To Headers@@<Mail Server>:25 said:
Unable to write data to the transport connection: An established connection was aborted by the software in your 
host machine.

Followed by:

Info Event ID 402, Source P3SS:

 

Account To Headers@@<Mail Server>:25 said:
System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted 
by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted
by the software in your host machine at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at P3SS.Networking.InnerProtocol.WriteCommand(String command) in
C:\Documents and Settings\Administrator\Desktop\p3ss\branches\features\Networking\InnerProtocol.cs:line 247 at P3SS.Networking.SmtpProtocol.innerSubmitMail(String to, String from, String mail) in
C:\Documents and Settings\Administrator\Desktop\p3ss\branches\features\Networking\SmtpProtocol.cs:line 175 at P3SS.Networking.SmtpProtocol.SubmitMail(String toEmailAddress, String mailToSubmit) in
C:\Documents and Settings\Administrator\Desktop\p3ss\branches\features\Networking\SmtpProtocol.cs:line 230 at P3SS.Engine.SmtpEngine.innerSafeSubmitMail(String message, String emailAddress) in
C:\Documents and Settings\Administrator\Desktop\p3ss\branches\features\Engine\SmtpEngine.cs:line 246

As I say, all email was delivered as far as I can see.   Any ideas?

Probably my dodgy compile (I'm a real novice with C#)

Cheers

- Chris

Coordinator
Sep 4, 2009 at 3:25 AM

I wouldn't worry too much about it - it looks like there was a network error. Even if the email failed to send, it would have been put into the 'Failed Messages' and tried again later.

Can you please test out the domain filter? I suspect that you'll probably want to turn it on anyway, otherwise P3SS will forward the email to everyone in the 'To' header; which may cause duplicate emails for other people or Failed Messages because your SMTP server refuses to forward the email onwards.

Thanks
 - Daniel

Sep 5, 2009 at 8:00 AM
Edited Sep 5, 2009 at 8:01 AM

Hey Daniel,

Nice one.

I've been running without the domain filter with a 5 min collection interval for well over 24hrs now. 

Whilst the flow of email to my exchange is not the biggest (only 11 emails received in this time!), all working fine.  A good mix of those emails were either html, text, emails with attachments etc., including emails to domains other than my own.  All working fine!

This morning, I've set the domain filter and sent a quick email to my domain and my hotmail account.  Again all works brilliantly.

I'll leave this to "soak" over the weekend, but I'm not envisioning any issues at all.

Cheers,

- Chris

Coordinator
Sep 5, 2009 at 8:10 AM

Hi Chris,

You may wish to grab revision 25463 from the source control - this has a number of bug fixes, such as recognising the 'cc' and 'bcc' headers when considering who to forward the email to.

Thanks,
 - Daniel