[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: different From: addresses with mutt, etc.

On Sat, Sep 03, 2005 at 11:07:44AM -0700, paslist@ultrasw.com wrote:

> For some reason (maybe a lock of some kind) Thunderbird is not 
> running on my system so I have taken this opportunity to get
> more familiar with mutt, exim and fetchmail.
> I seem to have gotten most important things to work.  One thing I 
> miss that I need is a quick way to set the From: field since I 
> have three different email addresses that I send messages from.
> With Thunderbird the From: address was set automatically 
> correctly depending which folder I was in.  Using Esc-F still 
> requires that I type the complete address.

If other people's suggestions in this thread don't work for you, you
could try something like this in your .muttrc to change the From: line
when required:

	macro generic "<esc>1" ":set from = \"name.example.com\""
	macro generic "<esc>2" ":set from = \"name2.example2.com\""

If you need to use different "smarthost" servers with the different
email accounts, it gets more complicated. I use msmtp, with macros
similar to the above which also set the "sendmail" variable.

> Another important feature that I haven't found yet is a good way 
> to filter messages automatically.  It looks like the 'mailbox' is
> part of the answer.

procmail (or one of the alternatives) is part of the answer.
For instance, I have this kind of thing in my .muttrc:

	set folder = "/home/pjr/Mail"

	mailboxes \
		=inbox \
		=debian \
		=w3c \
		=bbc \

and in .procmailrc:


	* ^List-Id:.*lists\.debian\.org

	* ^List-Id:.*w3c-announce\.w3\.org

	* ^From:.*bbc\.co\.uk


(Don't use the trailing "/" if you're using mbox format instead of
maildir. ANd I've left out all the spam filters.)

If you don't want to learn procmail, you could try one of the
allegedly simpler alternatives that I've not tried yet.

I'd ask for details of your Thunderbird problem, but I'd rather you
used mutt. ;-)

PJR :-)

Attachment: signature.asc
Description: Digital signature

Reply to: