[Techtalk] procmail recipe wont work
Wim De Smet
kromagg at gmail.com
Wed Jan 10 21:25:25 UTC 2007
On 1/10/07, Conor Daly <conor.daly-linuxchix at cod.homelinux.org> wrote:
> On Wed, Jan 10, 2007 at 08:37:43PM +0100 or so it is rumoured hereabouts,
> Wim De Smet thought:
> > On 1/10/07, Conor Daly <conor.daly-linuxchix at cod.homelinux.org> wrote:
> > >So, I'm trying to put together a procmail recipe to forward a particular
> > >source to a list. The source address is:
> > >
> > >first.last+marker at example.com
> > >
> > >where first.last at example.com is the address our mailserver forwards to my
> > >account. The '+marker' bit is to distinguish a particular sender for
> > >procmail. The current recipe is:
> > >
> > >:0
> > >* ^TOfirst.last+marker at example.com
> > Looks weird to me. I thought this just got passed to egrep in which
> > case it should be something like:
> > * ^To: *first.last+marker at example.com
> > or
> > * ^To: first.last+marker at example.com (since there's usually only one
> > space there anyway)
> > I seem to be missing something here but I don't know why you wrote TO
> > and then the address straight behind it. It's probably case
> > independent but skipping the ':' and the space shouldn't work. Sorry
> > if I'm completely wrong here.
> This is supported by procmail. It expands to any of the possiblities in
> the error message below.
> procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|
> first.last+marker at example.com"
> On the other hand, using '^To:.*first.last...' would match only a line
> beginning 'To:...' and wouldn't match any of the others. In any case it
> turns out the '+' has a special meaning and needs to be escaped.
> * ^TOfirst.last\+marker at example.com
> works nicely...
Ah cool, I only saw your other post after sending mine. Damn you gmail
and your broken threading! Good to know about the ^TO thing then, I'll
have to start using that.
More information about the Techtalk