

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
10 messages in net.sourceforge.lists.courier-sqwebmailRe: [sqwebmail] <user>@<host> instead...| From | Sent On | Attachments |
|---|---|---|
| Rainer Sigl | Jul 4, 2006 12:59 pm | |
| Brian Candler | Jul 5, 2006 5:46 am | |
| Rainer Sigl | Jul 5, 2006 1:23 pm | |
| Brian Candler | Jul 5, 2006 3:29 pm | |
| Brian Candler | Jul 5, 2006 3:40 pm | |
| Rainer Sigl | Jul 6, 2006 12:51 am | |
| Brian Candler | Jul 6, 2006 1:04 am | |
| Rainer Sigl | Jul 6, 2006 1:40 am | |
| Brian Candler | Jul 6, 2006 1:45 am | |
| Rainer Sigl | Jul 6, 2006 3:12 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [sqwebmail] <user>@<host> instead of <user>@<domain> in envelope sending email with sqwebmail? | Actions... |
|---|---|---|
| From: | Rainer Sigl (si...@mpe.mpg.de) | |
| Date: | Jul 6, 2006 12:51:12 am | |
| List: | net.sourceforge.lists.courier-sqwebmail | |
Brian Candler schrieb:
On Wed, Jul 05, 2006 at 10:23:44PM +0200, Rainer Sigl wrote:
In my users virtual home-mail-dir I have eg. a file named sqwebmail-config with the contents SORT=D PAGESIZE=10 AUTOPURGE=7 NOFLOWEDTEXT=0 NOARCHIVE=0 STAR TOFWEEK=0 FULLHEADERS FROM="Rainer+20Sigl"+20<si...@mpe.mpg.de> This tells sqwebmail to take this return-address instead of the default (???)
Well, the From: header is different from the envelope return-address (which is MAIL FROM during a SMTP transaction)
Now you UTSL (Use The Source, Luke [TM])
Looking at sendit.sh.in, it invokes the MTA using
exec @mailer@ $DSN -f "$1"
So, the return-address is $1, the first argument passed to the script. The From: header is separate, and is passed in on stdin along with the rest of the headers and the message body.
grepping for 'sendit' you find this is run from newmsg.c, where the return address is generated by login_returnaddr():
returnaddr=login_returnaddr(); execl(SENDITSH, "sendit.sh", returnaddr, sqwebmail_mailboxid, NULL);
login_returnaddr() is defined in auth.c. This gets the contents of the AUTHADDR environment variable, which is the login name the user entered to login to sqwebmail. If it doesn't contain '@', then '@' myhostname() is appended.
So, the From: address which the user chooses, is not related to the return address on the mail.
suddenly and without substantiation in my mind the user@mpemail is sending the email.
Hopefully, it is clear why from above.
I figured out a little workaround: in the file sendit.sh (/usr/lib/courier/sqwebmail) I changed in the shell-script the user@mpemail with us...@mpe.mpg.de with useratmpe=${1%@*}@mpe.mpg.de #exec /usr/sbin/sendmail -oi -t $DSN -f "$1" exec /usr/sbin/sendmail -oi -t $DSN -f "$useratmpe"
this configuration works fine but its only a workaround!!!
Well, you don't need this hack if you just want to append a different domain to the username. You can simply create a file $(sysconfdir)/hostname containing the domain you want appended, and this is used to build the return address. This is documented in the INSTALL file. If you don't create this file, then myhostname() falls back to using the gethostname() system call, to get the machine's actual hostname.
However, if the user changes the From: header to something completely different, say xy...@hotmail.com, the return address will still be logi...@mpe.mpg.de
Alternatively, it may be possible to invoke or configure exim in such a way that the return address is extracted from the From: header. I haven't dug into this. Or you can modify newmsg.c to call login_fromhdr() instead of login_returnaddr() to pass to sendit.sh
HTH,
Brian.
Hi Brian, many thanks for your answer. I tried to set /usr/lib/courier/sqwebmail/etc/hostname and /etc/hostname. but both files didn't have the desired effect resp. I didn't see any effect.. Still keeping my hack. I don't like changing the source files because I don't do without debian's update mechanisms. Regards Rainer
--
----------------- Rainer Sigl, | email: si...@mpe.mpg.de MPI f. extraterrestrische Physik, | phone: +49 (89) 30000-3557 Postfach 1312, | fax: +49 (89) 30000-3569 D-85741 Garching, Germany | web: http://www.mpe.mpg.de/~sigl/







