Damn, am really out of it today :(
i attached the wrong file, with an unworkling version of the patch.
here it does, hopefully this time is the one hehe
here's the text of the patch, JUST, in case ;)
--- vpopmail-4.9.8-1/AUTHORS Tue Dec 12 14:38:34 2000
+++ vpopmail-4.9.8-1.new/AUTHORS Tue Mar 13 22:44:48 2001
@@ -51,3 +51,6 @@
Sean Truman <[EMAIL PROTECTED]>
mysql code to set a time stamp when a user authenticates
+Javier Frias <[EMAIL PROTECTED]>
+ Mail Drip code.
+
--- vpopmail-4.9.8-1/acconfig.h Mon Oct 30 19:06:06 2000
+++ vpopmail-4.9.8-1.patched/acconfig.h Fri Mar 2 01:08:12 2001
@@ -28,6 +28,8 @@
#undef USE_DELIVER_FILTER
+#undef MAIL_DRIP
+
#undef UCSPI_DIR
#undef ENABLE_LOGGING
--- vpopmail-4.9.8-1/configure.in Tue Jan 2 15:50:33 2001
+++ vpopmail-4.9.8-1.patched/configure.in Fri Mar 2 00:34:44 2001
@@ -466,6 +466,21 @@
;;
esac
+AC_ARG_ENABLE(mail-drip,
+ [ --enable-mail-drip=n|y Ability to make unmatched emails be
routed to external mail server via qmail-remote. works by opening a
.smtp-route file placed in domain home, and using first line as the external
mail server., default is no],
+ MAIL_DRIP=$enableval,
+ [
+ MAIL_DRIP=no
+ ])
+case $MAIL_DRIP in
+1*|y*|Y*)
+ MAIL_DRIP=1
+ AC_DEFINE_UNQUOTED(MAIL_DRIP,$MAIL_DRIP)
+ ;;
+*)
+ ;;
+esac
+
AC_ARG_ENABLE(ip-alias-domains,
[ --enable-ip-alias-domains=y|n enable virutal domain lookup via
reverse ip address lookup for virtual domains. ],
--- vpopmail-4.9.8-1/vdelivermail.c Tue Jan 2 16:22:08 2001
+++ vpopmail-4.9.8-1.patched/vdelivermail.c Wed Mar 14 03:21:39 2001
@@ -63,6 +63,9 @@
char TheUser[MAX_BUFF];
char TheDomain[MAX_BUFF];
+#ifdef MAIL_DRIP
+char TheSender[MAX_BUFF];
+#endif
int CurrentQuotaSizeFd;
#ifdef USE_DELIVER_FILTER
@@ -830,6 +833,10 @@
char bounce[1024];
char prefix[1024];
char *tmpstr;
+#ifdef MAIL_DRIP
+ char smtproute[1024];
+ int l;
+#endif
if (argc > 3) {
failtemp ("Syntax: %s [prefix [bounceable_mail]]\n",argv[0]);
@@ -847,8 +854,14 @@
scopy(TheUser, getenv("EXT"), MAX_BUFF);
scopy(TheDomain, getenv("HOST"), MAX_BUFF);
+#ifdef MAIL_DRIP
+ scopy(TheSender,getenv("SENDER"), MAX_BUFF);
+#endif
lowerit(TheUser);
lowerit(TheDomain);
+#ifdef MAIL_DRIP
+ lowerit(TheSender);
+#endif
vget_real_domain(TheDomain,MAX_BUFF);
pw_data=pop_user_exist(TheUser,TheDomain,prefix,bounce);
@@ -878,6 +891,19 @@
printf("%s", bounce);
}
fclose(fs);
+#ifdef MAIL_DRIP
+ } else if ((fs=fopen(".smtp-route", "r"))!= NULL){
+ if (fgets( smtproute, 1024, fs) != NULL){
+ l=strlen(smtproute);
+ smtproute[l - 1]='\0';
+
+ sprintf(tmp_buf, "/bin/cat |
%s/bin/qmail-remote \"%s\" \"%s\" \"%s@%s\" >/dev/null",QMAILDIR, smtproute,
TheSender, TheUser, TheDomain);
+ system(tmp_buf);
+ fclose(fs);
+ exit(0);
+ }
+#endif
+
} else {
printf(
"Sorry, no mailbox here by that name. vpopmail
(#5.1.1)\n");
Javier Frias writes:
> ok, as a dumb ass, i forget to include the patch
>
> hehe
>
>
>
>
> Javier Frias wrote:
>
>> Hrmm, haven't roamed these ways for a while :)
>>
>> well, anywayz,
>>
>> i've been using a very useful hack that i had done a while back that
>> allows
>> mail to be "dripped down" to another smtp server. Think of it as a way
>> to instead of having
>> a default pop account, you can have a default pop server, int he spirit
>> of the
>> virtusertable of sendmail.
>>
>> instructions for compile are simple, i tested it extensively on vpopmail
>> 4.9.8_1
>> but it does work on 4.9.9
>>
>> basically,
>> copy drip.patch to vpopmail source dir
>> patch < drip.patch
>> rm configure
>> autoconf
>>
>> and should see a new confiure option
>>
>> --enable-mail-drip=n|y Ability to make unmatched emails be routed to
>> external mail server via qmail-remote. works by opening a .smtp-route
>> file placed in domain home, and using first line as the external mail
>> server., default is no
>>
>> so that;s all folks....
>>
>> i have about two other internal patches that am gonna clean up and
>> release, hopefully they will
>> be included in base vpopmail.
>>
>> -Jav
>>
>> "Teach a man to make fire,
>> and He'll be warm for a day.
>> Set a man on fire,
>> and He'll be warm for a lifetime."
drip.patch.good.gz