What are the current fetchmail/getmail and/or procmail/maildrop utilities?
I currently have my mail delivered to my desktop system using SMTP as the system is on all the time and has a static IP. However I always get paranoid when I reconfigure it and/or do other maintenance so I'm considering moving back to a fetchmail/getmail based system. I also have a fairly complex mail filtering script I wrote myself in Python which is fed mail via .forward. What's the current "state of the art" way to collect mail and deliver it through a filtering system to mutt? If I can do this all in one program than so much the better but I'm happy with two programs if that would work better. I can stay with my existing filter system but, again, if I can consolidate things into one, easier to maintain, chunk then I'd be happy. I *don't* like procmail configuration files, they're one of the reasons I wrote my own. What does everyone else here do for collecting mail and filtering mail with mutt? -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > What does everyone else here do for collecting mail and filtering mail > with mutt? Fetchmail and procmail. Ugly, but ubiquitous and reliable. A friend pointed me at something "better" for mail filtering, but I can't recall what it was... mainly because I haven't gotten around to looking into it, on account of the fact that my current solution works well and requires no learning curve. Learning a new mail filter system is very low on the priority list. -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. pgpcLHQgiAmm9.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > I currently have my mail delivered to my desktop system using SMTP as > the system is on all the time and has a static IP. > > However I always get paranoid when I reconfigure it and/or do other > maintenance so I'm considering moving back to a fetchmail/getmail based > system. > > I also have a fairly complex mail filtering script I wrote myself in > Python which is fed mail via .forward. > > > What's the current "state of the art" way to collect mail and deliver it > through a filtering system to mutt? If I can do this all in one program > than so much the better but I'm happy with two programs if that would > work better. I can stay with my existing filter system but, again, if I > can consolidate things into one, easier to maintain, chunk then I'd be > happy. > > > I *don't* like procmail configuration files, they're one of the reasons > I wrote my own. > > > What does everyone else here do for collecting mail and filtering mail > with mutt? I am using imapfilter with lua configuration file for my imap account. That does the job for me and I like the fact that I declare my filters with actual code(be it lua, python or what not) Best, Nikola
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 07:17:46PM +0200, Nikola Petrov wrote: > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > I currently have my mail delivered to my desktop system using SMTP as > > the system is on all the time and has a static IP. > > > > However I always get paranoid when I reconfigure it and/or do other > > maintenance so I'm considering moving back to a fetchmail/getmail based > > system. > > > > I also have a fairly complex mail filtering script I wrote myself in > > Python which is fed mail via .forward. > > > > > > What's the current "state of the art" way to collect mail and deliver it > > through a filtering system to mutt? If I can do this all in one program > > than so much the better but I'm happy with two programs if that would > > work better. I can stay with my existing filter system but, again, if I > > can consolidate things into one, easier to maintain, chunk then I'd be > > happy. > > > > > > I *don't* like procmail configuration files, they're one of the reasons > > I wrote my own. > > > > > > What does everyone else here do for collecting mail and filtering mail > > with mutt? > > I am using imapfilter with lua configuration file for my imap account. > That does the job for me and I like the fact that I declare my filters > with actual code(be it lua, python or what not) > How does that actually work? I've found its home at https://github.com/lefcha/imapfilter but the documentation doesn't really tell me what it does (maybe my fault!). Does it move E-Mails around on the IMAP server, or does it collect them from the IMAP server and deliver them to you locally? Or does it do something else? -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Nov 07, 2012 at 02:15 PM +, Chris Green wrote: I *don't* like procmail configuration files, they're one of the reasons I wrote my own. What does everyone else here do for collecting mail and filtering mail with mutt? I use getmail and dovecot deliver. Getmail is great, fast, and flexible (and supports the OS X keychain, which I like). Dovecot is a bit overkill for just a filtering solution since it's a full IMAP server. However, I find dovecot deliver (which uses the sieve language for filtering) to be much more readable/writable than procmail. An added bonus is that my main IMAP account has sieve on the server, so I can filter mail remotely there using the same syntax as I do with my other accounts using getmail. I've looked into other solutions that are more compatible with offlineimap, like imapfilter (which I believe moves message server side, but is run from as a remote client) and a few other lesser known local solutions, like maildirproc, but in the end, sieve was the most straight forward for my setup.
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 01:04:17PM -0500, Tim Gray wrote: > On Nov 07, 2012 at 02:15 PM +, Chris Green wrote: > >I *don't* like procmail configuration files, they're one of the reasons > >I wrote my own. > > > >What does everyone else here do for collecting mail and filtering mail > >with mutt? > > I use getmail and dovecot deliver. Getmail is great, fast, and I had a look at dovecot deliver, I make take another look. > flexible (and supports the OS X keychain, which I like). Dovecot is > a bit overkill for just a filtering solution since it's a full IMAP > server. However, I find dovecot deliver (which uses the sieve > language for filtering) to be much more readable/writable than > procmail. An added bonus is that my main IMAP account has sieve on I think anything is more readable than procmail! :-) > the server, so I can filter mail remotely there using the same > syntax as I do with my other accounts using getmail. > > I've looked into other solutions that are more compatible with > offlineimap, like imapfilter (which I believe moves message server > side, but is run from as a remote client) and a few other lesser > known local solutions, like maildirproc, but in the end, sieve was > the most straight forward for my setup. There seem to be very few currently maintained MDA/filters. Thanks. -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
/ Nikola Petrov wrote on Wed 7.Nov'12 at 19:17:46 +0200 / > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > I currently have my mail delivered to my desktop system using SMTP as > > the system is on all the time and has a static IP. > > > > However I always get paranoid when I reconfigure it and/or do other > > maintenance so I'm considering moving back to a fetchmail/getmail based > > system. May I ask what it is that you are worried about using smtp delivery - I take it you have various protective measures in place with your configuration?
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 08:16:42PM +, Jamie Paul Griffin wrote: > / Nikola Petrov wrote on Wed 7.Nov'12 at 19:17:46 +0200 / > > > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > > I currently have my mail delivered to my desktop system using SMTP as > > > the system is on all the time and has a static IP. > > > > > > However I always get paranoid when I reconfigure it and/or do other > > > maintenance so I'm considering moving back to a fetchmail/getmail based > > > system. > > May I ask what it is that you are worried about using smtp delivery - I take > it you have various protective measures in place with your configuration? No specific "protective measures" at all, it just relies on the sending server retrying if my SMTP server isn't running (or connected). That's one of the reasons I'd quite like to move away from SMTP. It *should* be OK but I'm relying on the other end to behave properly. -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 10:48:45AM -0600, Derek Martin wrote: > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > What does everyone else here do for collecting mail and filtering mail > > with mutt? > > Fetchmail and procmail. Ugly, but ubiquitous and reliable. Same here. I keep meaning to hook in an adaptive spam filter, but I haven't bothered so far. Maybe mutt just makes it so easy to quickly triage my mail that it hasn't seemed worth it. -pd -- Peter Davis The Tech Curmudgeon http://www.techcurmudgeon.com
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > No specific "protective measures" at all, it just relies on the sending > server retrying if my SMTP server isn't running (or connected). That's > one of the reasons I'd quite like to move away from SMTP. It *should* > be OK but I'm relying on the other end to behave properly. It will. It has to. If it didn't, e-mail on the internet would be horribly unreliable. -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. pgpJffX3FQ2q2.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 05:35:45PM +, Chris Green wrote: > On Wed, Nov 07, 2012 at 07:17:46PM +0200, Nikola Petrov wrote: > > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > > I currently have my mail delivered to my desktop system using SMTP as > > > the system is on all the time and has a static IP. > > > > > > However I always get paranoid when I reconfigure it and/or do other > > > maintenance so I'm considering moving back to a fetchmail/getmail based > > > system. > > > > > > I also have a fairly complex mail filtering script I wrote myself in > > > Python which is fed mail via .forward. > > > > > > > > > What's the current "state of the art" way to collect mail and deliver it > > > through a filtering system to mutt? If I can do this all in one program > > > than so much the better but I'm happy with two programs if that would > > > work better. I can stay with my existing filter system but, again, if I > > > can consolidate things into one, easier to maintain, chunk then I'd be > > > happy. > > > > > > > > > I *don't* like procmail configuration files, they're one of the reasons > > > I wrote my own. > > > > > > > > > What does everyone else here do for collecting mail and filtering mail > > > with mutt? > > > > I am using imapfilter with lua configuration file for my imap account. > > That does the job for me and I like the fact that I declare my filters > > with actual code(be it lua, python or what not) > > > How does that actually work? I've found its home at > https://github.com/lefcha/imapfilter > but the documentation doesn't really tell me what it does (maybe my fault!). > > Does it move E-Mails around on the IMAP server, or does it collect them > from the IMAP server and deliver them to you locally? Or does it do > something else? No it doesn't deliver them to you. It sort of filters them online on the server. You can then use something like offlineimap to deliver them locally to you. I use imapfilter + offlineimap + notmuch + mutt and I am far from happy with my setup at the moment. Best, Nikola
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
* On 07 Nov 2012, Derek Martin wrote: > On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > > server retrying if my SMTP server isn't running (or connected). That's > > one of the reasons I'd quite like to move away from SMTP. It *should* > > be OK but I'm relying on the other end to behave properly. > > It will. It has to. If it didn't, e-mail on the internet would be > horribly unreliable. I hate to break it to you, but :) I've used IMAP pickup in the past and it's OK for some IMAP servers. A year or two ago my employer moved my mailbox to MS Exchange. Exchange doesn't (necessarily?) hand you the exact e-mail it received. It parses incoming mail, stores the parsed components, and reconstructs the message the best it can figure when you pick it up via IMAP or POP. Along the way it might modify or remove some components for no good reason; for example, multipart/alternative with text/plan and text/html invisibly becomes just a text/html message. I've also heard of its breaking crypto, although I haven't seen that myself for a while. So I forward my mail via SMTP away from my employer now. -- David Champion • d...@bikeshed.us
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 04:33:58PM -0600, David Champion wrote: > * On 07 Nov 2012, Derek Martin wrote: > > On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > > > server retrying if my SMTP server isn't running (or connected). That's > > > one of the reasons I'd quite like to move away from SMTP. It *should* > > > be OK but I'm relying on the other end to behave properly. > > > > It will. It has to. If it didn't, e-mail on the internet would be > > horribly unreliable. > > I hate to break it to you, but :) > > I've used IMAP pickup in the past and it's OK for some IMAP servers. Right, we're talking about SMTP delivery to a machine that's sometimes down or unreachable... Very reliable. :) Presumably that's exactly why you're using SMTP to deal with your exchange problem! -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. pgpjzCLzrNrxL.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
/ David Champion wrote on Wed 7.Nov'12 at 16:33:58 -0600 / > * On 07 Nov 2012, Derek Martin wrote: > > On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > > > server retrying if my SMTP server isn't running (or connected). That's > > > one of the reasons I'd quite like to move away from SMTP. It *should* > > > be OK but I'm relying on the other end to behave properly. > > > > It will. It has to. If it didn't, e-mail on the internet would be > > horribly unreliable. > > I hate to break it to you, but :) > > I've used IMAP pickup in the past and it's OK for some IMAP servers. A > year or two ago my employer moved my mailbox to MS Exchange. Exchange > doesn't (necessarily?) hand you the exact e-mail it received. It > parses incoming mail, stores the parsed components, and reconstructs > the message the best it can figure when you pick it up via IMAP or POP. > Along the way it might modify or remove some components for no good > reason; for example, multipart/alternative with text/plan and text/html > invisibly becomes just a text/html message. I've also heard of its > breaking crypto, although I haven't seen that myself for a while. > > So I forward my mail via SMTP away from my employer now. > > -- > David Champion • d...@bikeshed.us Yes i think the benefits of using your own smtp delivery are worth it.
pipe headers to a file on send from compose window
When piping a message from the compose menu, I receive only the body of the mail and not its headers. I want to capture the headers before sending the mail and am using this macro. macro compose ,y "/home/eric/bin/get_subject" The headers are not being passed to the script get_subject. What would be the solution? -- Eric Smith
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 11:21:59PM +, Jamie Paul Griffin wrote: > Yes i think the benefits of using your own smtp delivery are worth it. I can only agree. And to avoid issues when my landline is down I have a VM on a big hoster that on one side delivers all my locally generated mails to avoid the dialin IP address problem. And on the other side it acts as the backup MX that stores my mails until my landline is back online and it can be delivered at my home. regards, Andre -- Andre Klärner smime.p7s Description: S/MIME cryptographic signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On 07Nov2012 14:15, Chris Green wrote: | I also have a fairly complex mail filtering script I wrote myself in | Python which is fed mail via .forward. | | What's the current "state of the art" way to collect mail and deliver it | through a filtering system to mutt? If I can do this all in one program | than so much the better but I'm happy with two programs if that would | work better. I can stay with my existing filter system but, again, if I | can consolidate things into one, easier to maintain, chunk then I'd be | happy. | | I *don't* like procmail configuration files, they're one of the reasons | I wrote my own. | | What does everyone else here do for collecting mail and filtering mail | with mutt? I collect email with getmail and deliver it to my "spool" folder. I file mail with "mailfiler", a python program of my own, to monitor the "spool", "spool-in", "spool-out" and "spool-spam-subj" maildirs. It understands extremely easy to write and read filter rules, eg: =spam SPAM-SUBJ subject:/^You have 24 hours left to TRIPLE your deposits !=me,$EMAIL_IPHONE . to,cc:(ME) from:(FAMILY|FRIENDS|[...snipped: other mail group names]) muttMutt-Usersmutt-users@mutt.org The first rule uses a regexp on the subject header and diverts matching messages to my "spam" mail folder/septic-tank. The second rule does proper address parsing of the named headers and (in the example above) checks addresses against sets of addresses in my maildb. Almost instant, and very reliable. The "!" means issue an "alert", for "important" messages. The third rule also does a proper address parse of to/cc/bcc and if "mitt-us...@mutt.org" is there, saves the message in the "mutt" folder with the "Mutt-Users" X-Label header added. I've actually described my setup at some length on the list just recently, here and here: http://www.mail-archive.com/mutt-users@mutt.org/msg45217.html http://www.mail-archive.com/mutt-users@mutt.org/msg45215.html outlining my setup, why I don't use procmail, what I used to do to beat procmail into order in the past, etc. In short, the rules for "spool" divert spam and copy other messages to "spool-in". The rules for "spool-in" file messages into my main inbox and multitudinous other folders for mailing lists. "spool-out" is for cross filing copies of my outbound email. Aside: "spool-spam-subj" is for recording the subject lines of all messages filed there as to be considered spam. So I've got a mutt macro to save a repetitious spam to that folder, and the rules there add a new rule to my spam filter:-) Mailfiler notices rule updates on the fly. Because mailfiler runs in the background, polling very regularly (1Hz, and the machine load for that is insignificant), if I modify my rules all I need to do to refile a message via the rules is to save it into "spool-in" again. And off it goes. Of course there is a log file to tail to watch this stuff happen. There's a man page for the mailfiler rule syntax here: https://bitbucket.org/cameron_simpson/css/src/tip/man/mailfiler.5.pod and for mailfiler itself here: https://bitbucket.org/cameron_simpson/css/src/tip/man/mailfiler.1.pod Source code: https://bitbucket.org/cameron_simpson/css/src/tip/lib/python/cs/app/mailfiler.py Cheers, -- Cameron Simpson On 12/22/07, Brian Hansen wrote: > 2. Rather than auditing a lot of code, correcting a lot of coding mistakes, > like the OpenBSD security team has done, and still do, why not shift from C > to something, just as fast and powerfull as C, but more secure? Again like > Ada. (to completely avoid the possibilities of those errors). why did you write your email in english? esperanto is simpler and less error-prone. - Ted Unangst in misc.openbsd.org
mutt + exchange woes (Was: Re: What are the current fetchmail/getmail and/or procmail/maildrop) utilities?
On Wed, Nov 07, 2012 at 04:33:58PM -0600, David Champion wrote: > I've used IMAP pickup in the past and it's OK for some IMAP servers. A > year or two ago my employer moved my mailbox to MS Exchange. Exchange > doesn't (necessarily?) hand you the exact e-mail it received. It > parses incoming mail, stores the parsed components, and reconstructs > the message the best it can figure when you pick it up via IMAP or POP. > Along the way it might modify or remove some components for no good > reason; for example, multipart/alternative with text/plan and text/html > invisibly becomes just a text/html message. I've also heard of its > breaking crypto, although I haven't seen that myself for a while. I haven't had it break crypto, but I'm one of 2 people at the company doing pgp signatures and both of us send *only* text/plain. I have had it give me text/plain only when there was an html part, which normally I wouldn't complain about, but if someone used an html link in their email, I *never* see the link or the url. > So I forward my mail via SMTP away from my employer now. I would love to do this, if for no other reason than I can have better server-side filtering, but I very highly doubt the company would go for it. Otherwise, mutt seems to work just fine with exchange. I do need to set up lbdb to pull from our exchange server at some point, but fortunately I interact with only a very small subset of the company, so my aliases file suffices for this, and if I need to look up someone's address I can always open up OWA. -Jeremy pgpvBZQTthinp.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Thu, Nov 08, 2012 at 01:06:54AM +0100, Andre Klärner wrote: > On Wed, Nov 07, 2012 at 11:21:59PM +, Jamie Paul Griffin wrote: > > Yes i think the benefits of using your own smtp delivery are worth it. > > I can only agree. And to avoid issues when my landline is down I have a VM > on a big hoster that on one side delivers all my locally generated mails to > avoid the dialin IP address problem. And on the other side it acts as the > backup MX that stores my mails until my landline is back online and it can > be delivered at my home. IMO, a better way to do this would be to have your current backup MX be your primary (and only?) and set it to have a high retry time, possibly even setting up something like ETRN[1] to trigger the remote MTA to flush its queue to you. You may also be able to configure your mail server to have a separate retry time for incoming vs outgoing mail. I *think* postfix can do this? Seems like something it would be able to do. [1]: http://www.postfix.org/ETRN_README.html I'm sure other MTAs support ETRN, but that was the first hit on google, and I'm a postfix user (retired qmail user, and qmail does *not* support ETRN) so it seemed prudent :) -Jeremy pgpAgBZsvGkf0.pgp Description: PGP signature
Re: pipe headers to a file on send from compose window
On Thu, Nov 08, 2012 at 12:37:27AM +0100, Eric Smith wrote: > When piping a message from the compose menu, I receive only the > body of the mail and not its headers. > > I want to capture the headers before sending the mail and am > using this macro. > > macro compose ,y "/home/eric/bin/get_subject" > > The headers are not being passed to the script get_subject. > What would be the solution? I really want to say that this is because you're only piping the attachment you currently have highlighted. Now, I'm not sure how to do what you're asking for, but I think that's what's going on underneath. One question though, what are you attempting to do with this? Perhaps we can help you find a better way to do it. It seems to me you're trying to capture outgoing subject lines with a script? (just judging by the name of your script) -Jeremy pgp47b1WKVwl6.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?]
Doh! My reply went to Peter instead of list! Bad mutt! On Wed, Nov 07, 2012 at 04:00:19PM -0500, Peter Davis wrote: > On Wed, Nov 07, 2012 at 10:48:45AM -0600, Derek Martin wrote: > > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > > What does everyone else here do for collecting mail and filtering mail > > > with mutt? > > > > Fetchmail and procmail. Ugly, but ubiquitous and reliable. > > Same here. I keep meaning to hook in an adaptive spam filter, but I > haven't bothered so far. Maybe mutt just makes it so easy to quickly > triage my mail that it hasn't seemed worth it. > /me too - the weirdnesses of procmail do my head in (too many things which get routed to deviant mailboxes, and a general need to allow multiple mailboxes for anything, such as lkml, which exceeds about 51 MB), but I have a setup which works _adequately_ [ had to add a 4th lkml mailbox at the end of last month : my mailboxes get rolled-over at the start of the month ]. ĸen -- das eine Mal als Tragödie, das andere Mal als Farce
Re: mutt + exchange woes (Was: Re: What are the current fetchmail/getmail and/or procmail/maildrop) utilities?
* On 07 Nov 2012, Jeremy Kitchen wrote: > > I haven't had it break crypto, but I'm one of 2 people at the company > doing pgp signatures and both of us send *only* text/plain. My memory is fuzzy but I think it was more complex multipart signed messages that it broke. > I have had it give me text/plain only when there was an html part, which > normally I wouldn't complain about, but if someone used an html link in > their email, I *never* see the link or the url. I may have it backwards. OTOH it may have both problems. > Otherwise, mutt seems to work just fine with exchange. I do need to set > up lbdb to pull from our exchange server at some point, but fortunately > I interact with only a very small subset of the company, so my aliases > file suffices for this, and if I need to look up someone's address I can > always open up OWA. True, mutt does pretty well. If you're compelled to use Exchange, mutt remains a good option. You can set a query_command that looks people up in AD, theoretically. I've never done this but I suspect that I could. Maybe that's functionally what you mean to do with lbdb, though? (Our campus uses both AD and LDAP, and LDAP is used for first-pass mail routing, so I'm querying it alone for now. -- David Champion • d...@bikeshed.us