Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Calling a callback function within Sendmail



[CLK: Wed, Jun 12, 2002 at 10:24:58PM -0400]
> <Re-post from last weekend>
> I'd appreciate any help to:
> Find where in Sendmail to insert c code that calls a callback function
> (to be implemented by us as well) when a sending MTA gets a "550 user
> not found" reply code in response to sending a "RCPT" command to a
> receiving MTA.

there's no need to write 3 times. 

In any event, here's a tiny patch that tries to touch /tmp/yahoo on
getting a 550. I suspect it only works for smtp (not local delivery),
but its a pretty obvious first step even if it isn't the best answer.



diff -ur sendmail-8.12.4/sendmail/usersmtp.c sendmail-8.12.4-patched/sendmail/usersmtp.c
--- sendmail-8.12.4/sendmail/usersmtp.c Fri May 24 14:53:48 2002
+++ sendmail-8.12.4-patched/sendmail/usersmtp.c Thu Jun 13 09:21:43 2002
@@ -2437,6 +2437,8 @@
        else if (r == 550)
        {
                to->q_status = ENHSCN_RPOOL(enhsc, "5.1.1", e->e_rpool);
+               close (creat ("/tmp/yahoo",O_WRONLY));
+
                return EX_NOUSER;
        }
        else if (r == 551)




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org