fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]oversize email notice, fetchmail-daemon(_at_)localhost, smtpaddress, courier esmtpd

2002-01-22 21:24:08
On 22-Jan-2002, Ronny Haryanto wrote:
I'm having the same problem as described in this thread
http://lists.ccil.org/pipermail/fetchmail-friends/2001-June/000735.html

I'm using Courier-MTA on RedHat Linux 7.2 which doesn't like
'FETCHMAIL-DAEMON(_at_)localhost' as the envelope sender (localhost is not
fqdn). This fetchmail-daemon address is generated by fetchmail for
oversize emails notices. I can't seem to convince fetchmail to use
'smtphost' or 'smtpaddress' option instead of plain 'localhost'.

[...]
- Before I dig into the sources myself, anybody ever hacked the source
  to do this (tell fetchmail to use 'smtpaddress' if available instead
  of 'localhost')? or maybe has a pointer on where to start?

Well, it turns out to be quite straightforward. Here's the patch
against fetchmail-5.9.6 if anybody needs it. Thanks to everyone who
responded off list.

Cheers,

Ronny

diff -ruN fetchmail-5.9.6/sink.c fetchmail-5.9.6rh/sink.c
--- fetchmail-5.9.6/sink.c      Fri Dec 14 15:51:24 2001
+++ fetchmail-5.9.6rh/sink.c    Wed Jan 23 11:13:04 2002
@@ -1212,7 +1212,11 @@
     struct msgblk reply = {NULL, NULL, "FETCHMAIL-DAEMON@", 0};
     int status;
 
+    /*
     strcat(reply.return_path, fetchmailhost);
+    */
+    strcat(reply.return_path, ctl->smtpaddress ? ctl->smtpaddress :
+           "localhost");
 
     if (!MULTIDROP(ctl))               /* send to calling user */
     {


<Prev in Thread] Current Thread [Next in Thread>