• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

HACK for POP Mailsystem

Hi:
I am looking for a hack (script) to use my linux server for picking up my email from a pop3 account.
This should be done automatic by a ppp connect.
NOW the difficult:
On my POP account i receive many emails not only adressed to me but to others which have been forwarded automaticly. I want this emails sorted in the right mail dirs on the linux server with correct from and reply to field!
That means i need a ready to install script which, after downloading and killing the ppp, sorts all emails into the correct boxes....

and now sending:
then the linux server should be acting like a smtp server for all clients conntected to it and should collect all emails and when the ppp connection is established should send the emails.

If you can provide a detailed discription of this system with everything included like scripts for ppp, crontab smtp etc. then i am willing to give you a lot more points!!!
0
dzeiss
Asked:
dzeiss
1 Solution
 
df020797Commented:
Ok.

For starters... to pop your mail just use the popclient command. If you read the man file you easily can produce a script for it.

Filter mail? Well... use procmail and a good .procmailrc at your account.

Automatic exmptying the mailq when connected? Easy... have the PPP script cretaing a semaphore file. Then have sendmail dead until the semaphore exists (a cronjob). Start sendmail and emptying the queue.

The solution above is thiugh a single person solution. If you want to support multiple clients/computers... I recomend using UUCP as mail transfer method. Still you canuse PPP as uplink cuz UUCP can be done via tcp. Sendmail then just runs all the time at your side collecting outgoing mail which it queues in the uucp spool directory. When you're connected you start a UUCO script which contacts the UUCP server on the other side. It colletcs and delivers mail. The UUCP deamon on the otherside then speaks to its smtp server and passes ont he mails you wanted to send. Sendmail on the other side also colletcs all mails which is going to your system and gives them to the UUCP system which awaits your call to collect them.

Easy, no? :-)

0
 
dzeissAuthor Commented:
"the popclient command"
-can not be found in new distributions just fetchmail :-(
"I recomend using UUCP "
-well UUCP is rather old and almost no webhosting company supports this-> no good solution :-(

I think i asked for somehing detailed! How it should work i already know, just details missing...


0
 
aligatoruCommented:
Well. To download the mail in your pop account you must use pop client
with the -o specifiying a file in wich the mail will go.
Then, afther the mail is downloaded you can use procmail to process
it and formail to generate 'good' From to and reply-to fields
in the header. The man procmailex will give you plenty of info
and working examples. There is no need to shutdown the sendmail
daemon.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now