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

smail 3.1.29.1-22 append_header="..." problem



$ dpkg -l smail
ii  smail           3.1.29.1-22    Electronic mail transport system.

I'm trying to force smail to append a custom header to all mail sent with
the smtp transport.

The smail(5) man page says that I can do it like so:

            remove_header="Content-Length",
            append_header="Content-Length: $body_size"

but when I put something like this in my /etc/smail/transports file, the
mail is moved to /usr/spool/smail/errror with the message 

/etc/smail/transports: illegal attribute separator after append_header
or
/etc/smail/transports: append_header: unknown attribute

here's my smtp transport:


smtp:	driver=tcpsmtp, max_addrs=100, -max_chars, inet;
	use_bind, defer_no_connect, -local_mx_okay, defnames,
	remove_header="Content-Length",
	append_header="Content-Length: $body_size",
	remove_header="X-No-Junk-Mail",
	append_header="X-No-Junk-Mail: Do not send me junk mail under any circumstances.",
	append_header="X-No-Junk-Mail: Do not add me to any mailing lists without my express request."

I've tried various combinations of the above (e.g. with only the
Content-Length header, and with only the X-No-Junk-Mail header), with
the same error message.

in case you're wondering: why do i want to do this with smail? so i dont
have to re-configure every bloody mail user agent on my system.  also,
netscape & lynx don't even give the option of adding custom headers. I'm
going to hack inews to do the same thing as well.

I'm also trying to promote the X-No-Junk-Mail header...maybe one day the
spammers and newsgroup trawlers will get the idea and write their software
to filter out messages with this header from their lists.  maybe one day
my junkmail daemon can retire (unlikely...it's getting more and more work
every week!)

Is this a bug in smail or a bug in the man page or am i just doing it
wrong? 


Craig


Reply to: