2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. | Help Search Members Calendar |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
NomadCF |
Posted: Sep 8 2006, 04:18 PM
|
Wizard Group: Members Posts: 428 Member No.: 434 Joined: 21-January 03 |
Heres the idea, I have a script that archives every message in and out (not spam or virus,etc). This file is copied directly from the spool dir fully intact (meaning with all the xmail headers in place). Now what I'm like to do is be able to re inject that copy back into the xmail spool.
I've tried just coping it into spool/temp (it just sat there) I've tired copying it into spool/local (it errors out “invalid spool file”) The closest thing I've got to work it by remove all the xmail headers from the copy expect the : “MAIL FROM,RCPT TO,<<MAIL-DATA>>” hen the message is delivered but it logs a lot of errors about the message and the headers f.u.b.a.r. So the question comes down to this how does one drop email into xmails queue for delivery ? -------------------- |
hschneider |
Posted: Sep 9 2006, 06:22 AM
|
||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Inject a mail by placing a RFC-conform mail file into spool/local. Each line has to have DOS style line endings:
If you want to restore archived mails, it's wise to remove all RECEIVED headers, because this can cause looping mails. -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||
NomadCF |
Posted: Sep 9 2006, 07:11 AM
|
Wizard Group: Members Posts: 428 Member No.: 434 Joined: 21-January 03 |
Thanks for the help, But I found it's only 1 return between the "RCPT TO:" and the headers. putting 2 return between then fubars the message and the server things the header are part of the body. But thanks for pointing me in the right Direction !!!
-------------------- |
hschneider |
Posted: Sep 9 2006, 07:15 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Yes - just went in to correct it, but you were faster :-)
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
hschneider |
Posted: Sep 9 2006, 07:18 AM
|
||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
One more thing: If you are on Windows, using Perl, then you'll have to set the file's mode to binary before writing it:
Using the same code on other platforms doesn't matter. -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||
NomadCF |
Posted: Sep 9 2006, 07:30 AM
|
Wizard Group: Members Posts: 428 Member No.: 434 Joined: 21-January 03 |
you'll probably not want to just use time & a ramdom number, but also include the scripts PID (on windows this is not easy but there is a gpl program to help with this : http://www.scheibli.com/v3/projects/getpids/).
But this to is not 100% safe due to windows liking to reuse PID's rather quickly. I hope this doesn't come across as a being picky. -------------------- |
hschneider |
Posted: Sep 9 2006, 07:45 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Good point, let's doit with time+random+pid
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
hschneider |
Posted: Sep 9 2006, 07:48 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Just noticed, that the getpid thing is an .exe file. This will cause an overhead because a shell process is started . This will slow things down, eating up resources. However, it's a brilliant idea to use it on other platforms ...
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |