Hi everyone,
I'm hoping someone is kind enough to help me out. I'm writing a C# program and I'm trying to send an email from the program. I can successfully send via SMTP (make a connection to Mercury etc etc) however I'm not having any success sending via a pickup directory.
I've read the docs (and maybe I'm blind), but I can't seem to work this one out. If anyone has managed to do this, or would point me in the right direction, I'd be most grateful
Thanks in advance.
Allan
> Hi everyone,
>
> I'm hoping someone is kind enough to help me out. I'm writing a C#
> program and I'm trying to send an email from the program. I can
> successfully send via SMTP (make a connection to Mercury etc etc)
> however I'm not having any success sending via a pickup directory.
>
> I've read the docs (and maybe I'm blind), but I can't seem to work
> this one out. If anyone has managed to do this, or would point me in
> the right direction, I'd be most grateful
In order to send via the queue you need to send the message in "Glue" header format. This is simply a RFC 2822 message with the SMTP addresses added. Here's a sample.
------------------------ spam.101 ----------------------------
$$ cslaw@indirect.com
tstephen@mtshasta.lmms.lmco.com
support@tstephenson.com
From: swallace@cyberpromo.com (Sanford Wallace)
Organization: Ambulance Chasing, Inc.
To: "Laurence A Canter" <spamford@wilhelp.com>
Date: Fri, 17 Oct 2003 12:55:34 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Test Message
Reply-to: "Taylor Jimenez" <taylor@wilhelp.com>
CC: "Martha S Siegel" <Martha@smartbotpro.net>
Priority: normal
Message-id: <399917090.3123.1066456430@persephone.pmail.gen.nz>
X-mailer: Pegasus Mail for Win32 (v3.12c)
This is a test of the mail servers settings for spammers.
Here's a little text file that you can use to test Mercury/32
or Pegasus Mail. With Mercury or Mercury/32 you save the
file in the Mercury queue with the 101 extension. With Pegasus
Mail you save the message in the HOME mail directory with the
PMX file extension.
This is a file in "Glue" headers format, the $$ line is the
SMTP MAIL FROM: address, the next two lines are RCPT TO:
addresses and the blank line is the separator from the RFC 2822
message body. You can delete the Date: or Message-ID line in
the message body, the SMTP relay host is expected to add these
to the file. Copy and paste the file to Notepad and then save
it with the correct extension it the correct queue. Modify the
RCPT TO: "Glue" headers to use your own addresses.
---------------------------- cut here ----------------------------
>
> Thanks in advance.
Thomas,
Can you elaborate more? I tried your suggestion but I can not make it work. Here is my specific problem:
1. My content control rule is set to "move the message to a directory as a file."
2. I ocasionally find a legitimate massage in the directory. I adjust my filters to allow the specific sender.
Where do I move that file so Mercury/32 can re-process it? I tried the Queue directory but it sits there forever. Is the good message lost forever?
FYI: I am using the latest Mercury/32 in a Win32 platform.
Thanks.
No. What are the “glue headers” and what structure should they have? I did rename the file to have extension .101 and placed it in the \queue directory but it sat there for 10 minutes before I manually deleted it.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
The bigger question is why can't I just take the file that Mercury's rule created and simply move it to a folder for it to be re-processed? I would expect the file that Mercury creates to have all the necessary information. When I open one of those files with a text editor I can see all the pertinent information.
Eric
[quote user="ereichard"]
No. What are the “glue headers” and what structure should they have?
[/quote]
Reread Thomas's post above, he has explained the process clearly and given an example
[quote]
I did rename the file to have extension .101 and placed it in the \queue directory but it sat there for 10 minutes before I manually deleted it.
The bigger question is why can't I just take the file that Mercury's rule created and simply move it to a folder for it to be re-processed?
[/quote]
Because that's not how it works
[quote]
I would expect the file that Mercury creates to have all the necessary information. When I open one of those files with a text editor I can see all the pertinent information.
Eric
[/quote]
What about a mail with 20 recipients of which you are 1? Should Mercury resend it to all of them?
What about a BCC where there is no address in the message?
The glue headers take the place of the SMTP envelope information, which is not included in the RFC2822 message body.
is there any documentation on these "glue headers?" I edited the .101 file and added the email address exactly like Thomas showed (with some $$ in front) but the file still sits in the \queue directory forever. What are the $$$ why only on the first line and not on all the lines? Are all the lines the various recipients?
The (two & only two followed by a space) $$ signify the MAIL FROM: address.
The other lines are all RCPT TO: addresses (I have used a 'T ' to prefix these lines but it just tested OK without)
The BLANK LINE between the glue headers & the message body is also required.
Edit: Alternatively, you could just drop the .cnm file from your "MOVED' directory into the users mail folder.
[quote user="Thomas R. Stephenson"]> Hi everyone,
> $$ cslaw@indirect.com
>
> From: swallace@cyberpromo.com (Sanford Wallace)
> To: "Laurence A Canter" <spamford@wilhelp.com>
> Date: Fri, 17 Oct 2003 12:55:34 -0400
> CC: "Martha S Siegel" <Martha@smartbotpro.net>
[/quote]
cslaw and Laurence Canter and Martha Siegel and Sanford Wallace? I insist you wash your mouth with soap.
[quote user="subelman"]
[quote user="Thomas R. Stephenson"]> Hi everyone,
> $$ cslaw@indirect.com
>
> From: swallace@cyberpromo.com (Sanford Wallace)
> To: "Laurence A Canter" <spamford@wilhelp.com>
> Date: Fri, 17 Oct 2003 12:55:34 -0400
> CC: "Martha S Siegel" <Martha@smartbotpro.net>[/quote]
cslaw and Laurence Canter and Martha Siegel and Sanford Wallace? I insist you wash your mouth with soap.[/quote]
Hey, this is my spam test message. It's got them all in the message. ;-) It should never get into any users mailbox!
Your previous draft for topic is pending
If you continue, your previous draft will be discarded.