Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

ENVIRONMENT VARIABLES : QMAILINJECT

Quote Reply
ENVIRONMENT VARIABLES : QMAILINJECT
Hello Alex!

I prefer that GMail does not produce Return-Path: <anonymous@QMAILHOST> but inserts QMAILUSER@QMAILHOST to be able to catch the undeliverables. It is therefore the cgi should be logged in as a user, or not?

I cannot influence QMAILINJECT.

By substituting Return-Path: <QMAILUSER@QMAILHOST> as the first line of the *.eml it does not process the template correctly and the headers of Content are changed to 7 bit!!!

Any solution?

Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!#

Please change and correct the bug. I got it!

From: Mailbox_From@Domain.com
Return-Path: Mailbox_Returnpath@Domain.com

By not entering, the Return-Path shall be anonymous@Domain.com! By adding in there, it picks up correctly the mailpath where it should be returned in case of undelivered.

Note that this Red line above should be the second line and not the first. Otherwise it will not properly format the headers correctly and things like Content, Subject will be lost and some defaults shall be inserted.

All the above should be in the Email template parsing data like *.eml! The Mailbox_From/Returnpath could be any name one wants.

If the tags could be parsed in those *.eml that would be great, which is not the case now.

Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi,

Gossamer Mail does not add the Return-Path header. To add this in, you would need to manually edit the bounce.eml file.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex1

Yes, GMail does not. It is exactly therefore I suggested to add in the source code of all *.eml so that all the emails send by Gmail knows where to come back to. By not doing so, the emails are simply send without its traces address to come back.

For e.g. I wanted to find out if there are some bogus email addresses that the users filled out and if there were some Mailer-Deamon undelivered. From this I would be able to make out if an email address exists or not and delete the user.

Without the Returnpath, the undeliverable will not know how to come back.

I mean for e.f. register.eml does not produce Returnpath accurately unless a second line in the red above is added.

Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
No, this is not proper behaviour. See http://www.faqs.org/rfcs/rfc822.html section 4.3.1 where it says:

In Reply To:
This field is added by the final transport system that delivers the message to its recipient.
So qmail/sendmail/postfix or whatever mailer you are using should be the one to add the Return-Path header, not Gossamer Mail.

I think the problem may be stemming from lack of a Reply-To header, but will investigate further.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!

NOP! you are wrong and you are right.

Qmail is the mailing SMTP under discussion.

Returnpath is ofcourse the default by the server + Qmail and is "Always" added by the Qmail system and not by Gmail . Here I am debating on the variables that are passed from Gmail to Qmail to substitute the default return path of the Qmail.

Gmail does not or is not able to pass the """Prefered""" email returnpath to the Qmailinject and also for understandable reasons cannot and shall not. It just needs to be defined for a proper formatting. Because there is no formatting in the headers of the *.eml!

Hence on my server the default is anonymous@localhost.com as a returnpath. So all the undeliverables will be sent to a no ones mailbox = anonymous and I shall never see them. On your server it is root@gossamer-threads.com. But I want to have them delivered in the mailbox of for e.g. admin@localhost.com. However, the "From: admin@localhost.com" is not being added to the returnpath.

Hence this proves that to have the undeliverables to be returned to the mailbox = From .... the Returnpath should have the same formatting it needs to have

Returnpath: = From (Not the first line but the second line)

Only then the Returnpath will be converted to the desired one.

I am sure atleast about my server. May be not true for other.

On your server, if you want undeliverables to come back to the mailbox of Alex and not the root@gossamer-threads.com then you need to add the second line of the *.eml

Returnpath: alex@gossamer-threads.com

and then it will not go to the root but alex mail box!!!





Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi,

You can edit the bounce.eml in a text editor and add your Return-Path: header in there. I just tried it now and it works fine. Send an email to nosuchuser@gossamermail.com and you will get a bounced email with a different return path.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!

Thats exactly what I am saying since a long time. May be it was my english that did not make it clear.

All I said is that one "HAS to add" the return path in the current *.eml templates, all of them (since the ones you provided does not have the return path, however in the second line, to be able to obtain (only if one wants to) the undeliverables back to a specific account.

My discussion was on Register.eml and wanted to know who are the users that provided wrong email addresses by having their bounced back emails.

By the way, bounce.eml does not help to format register.eml. It is only register.eml, validated.eml and lost_pass.eml that really needs this returnpath formatting. Bounce.eml simply bounces the emails and I would not want them back!

Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi Alex (or anyone),

Are you able to cleary post how to do to fix this? I asked this in a different thread, and rajani pointed me here. Looks like the same problem but I can't quite figure out what to do from the different messages.

The original problem:

Email messages from my GM users are being bounced back to the server root when they're not being delivered for whatever reason, instead of being bounced back to the user who sent them on my GM setup. (It's also happening in my version of LinksSQL which is the latest one, so I'll have to fix that up too).

I'm using sendmail, and the header from the bounced emails shows the following...

***************
Return-Path: <root@nz2.newzealand.co.nz>
Received: (from root@localhost) by nz2.newzealand.co.nz ...
***************

Obviously where it's being returned to root it should instead be to the user who sent it.

Thanks,
R.

Last edited by:

ryel01: Sep 25, 2001, 2:30 AM
Quote Reply
Re: [ryel01] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi,

We are looking into this. One way to do this is to pass into sendmail the return path address using -f, however this is not secure. We are looking at another way that might work and will reply shortly.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Any luck with this yet Alex?

Cheers,
Regan.
Quote Reply
Re: [ryel01] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi,

Can you try switching to SMTP mode instead of /usr/sbin/sendmail and see if that works?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi Alex,

Tried switching over to smtp instead of sendmail - the return path in the header still comes through as root instead of the user. :(

(FYI, I tried it on my linksSQL setup which is doing exactly the same thing)

Regan.

Last edited by:

ryel01: Sep 28, 2001, 1:11 PM
Quote Reply
Re: [ryel01] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello!

As I mentioned above, I tried to swap the first and the second line and it did work for me fine indeed!!! For e.g. in your case------

Quote:
***************
Return-Path: <root@nz2.newzealand.co.nz>
Received: (from root@localhost) by nz2.newzealand.co.nz ...
***************


you can change the FIRST TWO LINES it to---

From: Admin@Domain.com
Return-Path: <%user%>@<%domain%>
Subject: <%user%> signed up!


for e.g. will parse in to ...............

***************
Received: (from root@localhost) by nz2.newzealand.co.nz >>>> What ever it should be....
Return-Path: <root@nz2.newzealand.co.nz>
......
***************

This I solved it in the earlier versions. I do not know in the recent version.

The problem was that GMail did not parse the first line for a very strange reason. So I shifted the tag to the second line of the array!!! Smile

By the way, I needed this in the area of register new user. At that time the templates did not get parsed correctly and this solution worked fine for me. Also, my account is on a shared server. So all the emails sent by the email templates and also "All the emails by an user, perhaphs" would go to root@mail.server.com and hence I shall never receive the acknowledgement of the undelivered emails nor the users would.

Last edited by:

rajani: Sep 29, 2001, 12:03 AM
Quote Reply
Re: [rajani] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Thanks Rajani, I'll give that a go.

I see that should fix the emails that are sent via templates through Gossamer Mail, but the problem still remains that any email sent from a user will bounce back to root.

I can't quite understand if you've got a solution for this problem or not? (email sent from users)

Cheers,
Regan.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Have you found a fix for this yet Alex???

It's happening with the latest version of Links as well so I'm getting swampped with all the returned emails that aren't being delivered from both Gossamer Mail and LinksSQL.

cheers,
r.

Quote Reply
Re: [ryel01] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hi Regan,

Can you email me shell information so I can try some tests out? It seems it's different depending on if you are using qmail, sendmail, smtp, etc.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!

Just to contribute from my side.....

Checking out which is the SNTP, I am using, is not QMail!!! :)

However, checking on my provider they say qmail is installed. Hence the confusion.

---------------------------------------
Outgoing Email Options:

SMTP Server:...........; (None)

Sendmail
Path ...........: /usr/sbin/sendmail
--------------------------------------


System Information
======================================
Perl Version: 5.006
Gossamer Mail Version: 2.0.2-Upgrade
MIME::Base64 Version: 2.11
Digest::MD5 Version: 2.11
Persistant Env: mod_perl (0) SpeedyCGI (0)
@INC =
xxx
/usr/local/lib/perl5/5.6.0/i386-freebsd
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i386-freebsd
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl

ENVIRONMENT
======================================
AUTH_TYPE => Basic
DOCUMENT_ROOT => /usr/www/users/me
GATEWAY_INTERFACE => CGI/1.1
GT_TMPDIR => /usr/cgi-bin/email/data/tmp
HTTP_ACCEPT => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
HTTP_ACCEPT_CHARSET => iso-8859-1,*,utf-8

HTTP_USER_AGENT => Mozilla/4.7 [en] (WinNT; I)
PATH => /usr/krb5/bin:/usr/krb5/sbin:/root/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/local/ssl/bin


SERVER_PROTOCOL => HTTP/1.0
SERVER_SIGNATURE =>
SERVER_SOFTWARE => Apache/1.3.14
UNIQUE_ID => O76uetFEAfkAAFGaDGw

What would be very interesting is if the GT Scripts gets the version of all the perl modules in its above display.

Hello Regan!

Since we both have the same Sendmail (!!!), but different behaviour of GMail, means perhaphs that there are some modules or the server installation that is different. But, here, The master needs to have a look. Since I do not have a problem like you, but "had" one as mentioned above.

I can perhaphs try to find out the version of all the modules, etc for a comparative check, if Alex wants. Let me know.

However, now I am not getting any emails from this thread and did not understand why.

Last edited by:

rajani: Oct 6, 2001, 12:27 AM
Quote Reply
Re: [rajani] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Quote:
Since we both have the same Sendmail (!!!),

When you install qmail, it installs a wrapper to emulate sendmail. So just because you see a /usr/sbin/sendmail, it does not mean you are using sendmail. You should do a `ps auxw` and see if you see qmail running.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!

On this shared server, it only tells me that two processes are running!!!

One is a bash shell and the other is the command that was entered i.e. ps auxw!!! and no sign of Qmail.

But may be there is anathor way, which I am not aware of.

Do you think it may be in this there could be an answer to the problem, then I can try to figure out by asking my provider.
Quote Reply
Re: [Alex] ENVIRONMENT VARIABLES : QMAILINJECT In reply to
Hello Alex!°

You are right. It does use the wrapper.

But that means that it works with the wrapper and not with the sendmail!!!

I was wrong to say that I use sendmail.