LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-20-2004, 01:34 AM   #1
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Rep: Reputation: 15
Linux CLI app similar to Mailwasher for Windows?


Is there one? I just want a simple app that uses a simple text file with rules that are used when logging into a remote POP3 server. I want to be able to delete files using specified criteria in the subject, sender, etc. It must run on the CLI without the need for GUI (unless text-based).

Does this exist?
 
Old 02-20-2004, 08:08 AM   #2
Ollie46
LQ Newbie
 
Registered: Feb 2004
Posts: 5

Rep: Reputation: 0
This is not exactly what you are looking for but I have found this solution to work very well.

Install sendmail (or other) on your system. Install ClamAV and SpamAssasin. Download the latest MailScanner system and install. Once you configure it, all incoming email will be checked for virus's and spam would be filtered.

Just add in fetchmail to download your email to your local machine and dump it in a local account. Then have your email client check your local server for email.
 
Old 02-20-2004, 11:12 AM   #3
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
That sounds like a very good idea. Now to put it to practice ...

Have you done this yourself? I'll have to look for fetchmail docs since I don't know where to begin. When accessing the e-mail that has been dumped to a local server account, how do I check it using a client? How would I go about implementing POP3? Thanks for your help.
 
Old 02-21-2004, 07:31 PM   #4
Ollie46
LQ Newbie
 
Registered: Feb 2004
Posts: 5

Rep: Reputation: 0
Quote:
Have you done this yourself?
Yes, I have done it for small business servers, web hosting servers, and on my personal workstation.

Quote:
I'll have to look for fetchmail docs since I don't know where to begin.
Fetchmail is one of the more easier tools to setup and one of the more usefull ones to use, in my opinion. I do not know what distro you are using, but RPM based stuff is very easy, and compiling by source is not hard either. The following links should get you started.

Fetchmail Homepage
Fetchmail Man Page

What I do is create a central fetchmail file, like:
/etc/fetchmail/.fetchmailrc or place .fetchmailrc in my /home/{username} directory. The actual file contents are described very clearly in the man page, buy looks something like this.

poll mail.isp.com proto pop3
user "johndoe24", with password abc123, is johndoe here;

This tells fetchmail to go to your isp's mail server, login with the username johndoe and provide password abc123, download all email using pop3 to local user acct johndoe.

You can start fetchmail as a daemon that checks at various intervals.
For Example: 'fetchmail -d 300 -f /etc/fetchmail/.fetchmailrc' starts the server in daemon mode, checks for new mail every 5 minutes, and calls the configuration information from /etc/fetchmail/.fetchmailrc. I also usually place the command line info in rc.local or similar depending what distro you are using, so that I don't have to remember each time I reboot.


Quote:
When accessing the e-mail that has been dumped to a local server account, how do I check it using a client?
You want to make sure that fetchmail is placing the email in the mail account of the user that you are logging in to the local machine as. From the local machine in a CLI situation, just open pine or mutt and it will open up the mail spool for that user which will give you the email that was downloaded. Going back to my example above, the email is being downloaded to a local account named johndoe, so in order to read that email, you will have to login as johndoe and open up a CLI mail client.


Quote:
How would I go about implementing POP3?
It is very straigh forward. I use Qpopper from Qualcomm. www.qpopper.org. Compile from the source, make install will place the needed binary in the correct location. Edit your inetd.conf or add a configuration for pop3 in your /etc/xinetd.d/ dir. Restart the inet service, and voila, pop3 server. Now if you are logging in locally to that machine, then you do not need pop3 server capability to read your email. But if you want to pop your server from another computer, you will need this.

The biggest thing to do first is to get your MTA configured, get ClamAV and SpamAssasin installed, and install MailScanner. These are not too terribly difficult, and will be a good learning project.

Have fun, and i'll try to be of any assistance to ya.
 
Old 02-21-2004, 11:35 PM   #5
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
Everything works great! Now to implement SpamAssassin.

When specifying

Quote:
fetchmail -d 36000 -f /home/vern/.fetchmailrc
.. as root... it gives me the error...

Quote:
File /home/vern/.fetchmailrc must be owned by you.
... I must run it as user "vern". How would I go about running the daemon as vern in rc.local?
 
Old 02-22-2004, 12:05 AM   #6
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
I've got SpamAssasin working ... but I'm unsure about setting custom rules in /etc/mail/spamassassin/loca.cf. How would I reject e-mails from certain addresses? How would I reject mail with a specified string is found in the subject or body?
 
Old 02-22-2004, 06:53 AM   #7
Ollie46
LQ Newbie
 
Registered: Feb 2004
Posts: 5

Rep: Reputation: 0
Without looking at any of the docs, I beleive fetchmail by default searches for .fetchmailrc in each home directory. So with that said, you should be able to just put "fetchmail -d 36000" in your rc.local file. This will then query all the individual .fetchmailrc's and place them in the desired mail accounts. Then all you would need to do is reboot the server, let fetchmail run its process and d/l email, Login as the normal user and check your mail.

One thing I didn't mention, .fetchmailrc should be chmodded to 0600 for proper access.

Another note is that if you d/l and install webmin, they make a fetchmail module for it that by default places the .fetchmailrc file in the /home directories of each user.
 
Old 02-22-2004, 08:17 AM   #8
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
I think I've gotten everything working. Thank you very much for your help. All I have to do is tests to make sure that SpamAssassin is filtering mail correctly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
run linux app. on windows SlipAway172 Linux - Software 2 06-21-2005 08:51 PM
CLI....ls (or similar command)...formatting output Basslord1124 Linux - Newbie 2 02-27-2005 05:13 PM
the option in linux similar to control panel in windows sailaja Linux - Software 5 12-01-2004 12:04 PM
App similar to Neotrace [win] carmoda Linux - Networking 2 11-23-2003 03:52 PM
A program similar to MailWasher (win32) MvD Linux - Software 0 11-10-2003 09:42 AM


All times are GMT -5. The time now is 07:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration