Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Problem Setting Up Email, getmail piped delivery into postfix
Amin
post Dec 31 2003, 04:11 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 31-December 03
Member No.: 2,050



Hello all,

Iíve just installed Getmail onto my clarkconnect (RH 9 compatible) box in order to retrieve emails from my ISP pop account and pipe them into (installed and setup by default) Postfix vie the command delivery option in getmailís getmailrc file.

The downloading from the ISP part I have managed to set-up and this runs fine. However being a linux n00b I seem to be having problems with the getting my mail from getmail into postfix. The entry in my getmailrc file reads:

postmaster = "| /usr/sbin/postfix start"

I guess this may not be right (sinceÖerhmÖit doesnít work) as I get the following error:

msg #1/18 : len 68773 ... retrieved ... failed delivering message (failure delivering message to command " /usr/bin/postfix start" ([Errno 32] Broken pipe)), skipping

Another thing that I think maybe a problem is that getmail will not run as root, or rather it will not execute an external command if it is run as root. Postfix on the other had seems to demand that it is run as superuser, which I assume is root.

BTW getmail is installed correctly and runsÖitís just that I donít know how to deliver email to it with command delivery.

PS. This should be very similar to the way fetchmail is setup I guess. So those users who use fetchmail, with postfix, sendmail, ext. how do you get email into these programs?
Go to the top of the page
 
+Quote Post
hughesjr
post Jan 2 2004, 10:18 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



PostFix doesn't deliver local e-mail ... it uses another program (like dropmail or procmail) to make local deliveries.

The command "postfix start" is going to start the postfix mail daemon ... not what you want to do with the getmail files.
-----------------------------------------------
What goals are you trying to accomplish with the getmail...answer these questions:

1. Are you retrieving mail for 1 actual person or more than 1 actual person?

(if only 1 person, an e-mail POP3 client like evolution is probably a better solution ... although you can use getmail to put all the files in a single users mail directory (the postmaster = "| /usr/bin/procmail 2>&1" ... and you would run it as each user ... you would first need to setup a mail directory for each user {i use $HOME/Mail ) and read it with evolution/kmail etc.)

2. If more than 1 person, does each person have more than one account or only one account?

3. Are you trying to deliver the mail locally ... OR are you trying to make the mail available for users to download to other computers. (if delivering locally only to multiple people who login on this machine ... and who don't need access from other computers, again .. evolution client might be better.)


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Amin
post Jan 4 2004, 09:12 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 31-December 03
Member No.: 2,050



Hi,

Thanks for the reply. Iím sorry I wasnít more clear with my question. I really, really was completely lost in the way linux did things.

Iíve learned a bit more now and I hope I can make a little more sense.

First a little about what Iím trying to do. I have the MX record for my domain pointing at the POP3 mailbox I got form my ISP. I plan to retrieve email from this account, which contains all email for @mydomain and download it to my linux mail server. The mail server will then filter the email with spamassassin and deliver it to each users mailbox. Mailboxs will then be accessed via IMAP or web mail from other computers.

There is more than one user account so in other words we have:

postmaster@mydomain.com
user1@mydomain.com
user2@mydomain.com
ext.
ext.

From what I understand procmail is not the tool to use to deliver to multiple user accounts. In other words you use procmail to sort all the email for user1 into different boxes but not to sort between mail for user1 and user2. This is the job of the MTA, in my case postfix.

I also know why I wasnít able to invoke postfix from getmail. The command I need to use is sendmail (although I have some doubts about this now). So it should be:

postmaster = "| /usr/sbin/sendmail" (maybe!)

Postfix is able to call on external filtering, spamassassin for example, from one of its configuration files (master.cf). The email gets filtered and then is handed back to postfix. Postfix can then either deliver it to the user mailbox (with the mail now tagged with spam) or hand it over to procmail for further sorting of each users mail.

The problem Iím seeing now it that email I pipe to postfix from getmail doesnít get filtered. I think this is because postfix doesnít recognise that mail as coming from outside the system and therefore needing to be filtered. This is why I think the Ďsendmailí command may be wrong or may require some argument in front of it. However, at least email retrieve by getmail is being delivered to the correct user mailbox.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th December 2017 - 03:31 AM