Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Qmail + Fetchmail 1

Status
Not open for further replies.

LinuXelite

Programmer
Jun 21, 2002
150
0
0
CA
Hi,

We developt a web-based CRM software. We designed something similar to gmail or horde.

We need to retreive our customer's email from their POP3 server.

At this moment, we programmed a JAVA deamon that get Email from their POP3 server and store it into a MySQL table.

However we have many issues:
- Javamail does not like weird encoding (RTF, spam, MS encoding);
- We need a anti-spam solution and anti-virus solution;
- Our deamon has few segfault and memory leak.

I'm thinking of another (better) solution and I'd like to know if my logics is correct.

I'm going to install a qmail server. For each user, I'll create a local account (user@customer.mydomain.com). Then, I'll use Fetchmail to retreive his email from a POP3 account. Our software will use the IMAP server to retreive and manage email instead of a mysql database.

I'd be easy to add a anti-spam feature within qmail with SpamAssassin.

My question: Can I use qmail/fetchmail (and maybe procmail?) to store and get email from many POP3 servers? Is there a good HOWTO somewhere?
 
Hmmmm....

qmail really doesn't like taking in mail for domains it doesn't work for (as rcpthosts).

However, fetchmail might be able to play some games for you...

Off the top of my head and without directly trying it:

1) Convert "To:" domain from "customer.com" to "customer.mydomain.com" in the POP'd email, create suitable domain entries in "rctphosts" on qmail and allow qmail's normal delivery mechanisms handle "local" delivery.

or

2) Bypass qmail and attempt direct Maildir delivery from customer pop3 to your local Maildir for that customer/user.

Ultimately what I see is a large problem of users sending email out from one account, then the other domain (customer.mydomain.com) might send some email, and so forth. It risks muddying the waters for the recipients as to who they're supposed to send to.... A consideration at least.

D.E.R. Management - IT Project Management Consulting
 
Thanks for your response.

However, is'nt possible to use QMAIL INJECT within Fetchmail? That should do but why use qmail-inject when I can use Procmail to move the message directly into the Maildir.

I think I'll make a test server and check if this works.

I don't see any problem with outgoing mail since I write the header myself.


 
Just be careful, I've been burned by using qmail-inject with fetchmail. qmail-inject actually retransmitted a nunmber of messages that had external co-recipients. Still not sure why it happened, but I don't do it.

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top