[SA-exim] Re: feedback: SpamAssassin at SMTP time in local_scan
dman
dman at dman.ddts.net
Wed, 8 May 2002 12:18:16 -0500
---------------------- multipart/signed attachment
On Tue, May 07, 2002 at 09:37:46PM -0700, Marc MERLIN wrote:
| On Tue, May 07, 2002 at 11:06:20PM -0500, dman wrote:
| > On Tue, May 07, 2002 at 12:15:30AM -0700, Marc MERLIN wrote:
| > | http://marc.merlins.org/linux/exim/sa.html
| >=20
| > Line 63 of local_scan.c is dead code.
| =20
| Yeah, thanks (working on your Subject suggestion right now). Tha=
t's
| obviously left over from the hardcoding I had before transfering everyth=
ing
| to options.
Cool, I see the Subject thing works now.
| > Why do you have the config file in /etc/mail instead of /etc/exim?
|=20
| Good question :-)
| That's because I've been maintaining exim locally for long enough =
and
| migrated everything to /etc/mail before the exim package thought about do=
ing
| it too, but to /etc/exim.
Ok, makes sense.
| My plan was for it to try reading the config file from
| /etc/mail, /etc/exim, and /etc
| I'll probably do that tonight.
I don't think that's a big deal since there's no dynamic loading of
the function anyways. Each installation must compile it for themself,
and thus can change it. KISS. Worst-case scenario is to use a
symlink.
| I'll answer your post on exim-users separately.
Good -- that will allow proper inline posting :-).
=20
| Thanks for the feedback, it is appreciated.
You're welcome.
I added these lines at line 175 in version 1.1.
/* make the file a valid mbox for convenience */
#define FROM "From Wed Dec 31 23:59:59 UTC 1969\n"
ret=3Dwrite( writefd , FROM , strlen(FROM) ) ;
CHECKERR(ret,string_sprintf("'From ' line write in %s", filename),__LIN=
E__);
It's convenient because 'mutt -f' will see it as a mbox folder (with
just one message) and 'vim' wil automatically syntax highlight it
correctly.
I'm planning on adjusting the logic a bit at some point. My idea is
to read the first line of output from the program to determine whether
it passes or fails and to extract the error message from that. The
rest of the output would be RFC2822 headers to update in the message.
Obviously 'spamc' would not work as the program in this scenario. My
reasoning is to generalize it a bit to facilitate writing my own
scanner that, in addition to delegating to spamc, would check for klez
and similar junk for immediate rejection. This program, at a minimum,
would frontend spamc and adapt spamc's output to fit the format (and
include the logic to determine pass/fail and build the error message).
This would make the local_scan more similar to exiscan in operation
(deferring to an external program for result and message) but would
keep the ability to modify a message's headers and save them for the
admin to monitor. I also expect it would reduce the amount of C in
the local_scan.
I am having a problem with the saving of messages, though. I want
them in a maildir folder. That's easy enough; I just specified a path
like /var/mail/dman/SApermreject/new and made the cur and tmp
directories myself. The problem is in permissions. All the
/var/mail/dman/SA**/* directories are dman:mail, 6770. However files
would still be created as mail:mail 0600. Thus my user account
couldn't read them. I've temporarily solved the problem by adjusting
the creat() call to set the perms to 666. I thought making the
directory SUID me would force the files to be owned by me.
-D
--=20
If we claim we have not sinned, we make Him out to be a liar and His
Word has no place in our lives.
I John 1:10
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg
---------------------- multipart/signed attachment
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://lists.merlins.org/archives/sa-exim/attachments/cfe8caa6/attachment.bin
---------------------- multipart/signed attachment--