LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sendmail - Creating queue files directly (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-creating-queue-files-directly-822525/)

Smix 07-27-2010 07:59 PM

Sendmail - Creating queue files directly
 
I am directly creating "qf" & "df" files into the sendmail queue folder and then processing this queue by command line. This is the only way to export data and email from this old application I am stuck with.

This works quite well in my test enviornment but I am really new to linux/sendmail and just looking for any feedback on this process. Is this direct creation of queue files safe and any pitfalls that I should be aware of?

unSpawn 07-29-2010 05:33 AM

Quote:

Originally Posted by Smix (Post 4047392)
This is the only way to export data and email from this old application I am stuck with.

Sounds intriguing. What application dared to disturb tranquility and invade the realm of completely uneventful admin nirvana? ;-p


Quote:

Originally Posted by Smix (Post 4047392)
Is this direct creation of queue files safe and any pitfalls that I should be aware of?

If your queue file creator does duplication detection, handles errors and sets ownership and DAC rights correctly and places the queue files in a queue no other application writes to you may have covered most of what the MTA would do itself. BTW, what do you create those queue files with?

Smix 07-29-2010 08:47 PM

Hi unSpawn, thanks for getting back to me.

Its a custom database app written in "Superbase 2001" which I have very little knowledge of and the whole thing is being replaced in a year anyway. What I have managed to do is to create a little macro in this software to output "qf,df" txt files and put them in this folder "var/spool/customqueue"

The content of the qf file are:
S<failto@from.com>
R<to@to.com>
H??From:<from@from.com>
H??To: <to@to.com>
H??Subject: Hello World
H??MIME-Version: 1.0
H??Content-Type: multipart/alternative; boundary="--my_email_part"
.

Then I call this command "/usr/sbin/sendmail -oQ/var/spool/customqueue-q" to process the queue.

I have not built any error handling or the other MTA functions you mentioned but sendmail seems to be taking over it, for example if an email is deferred, the qf file is updated appropriately and the email retried later.

What do you think, is this way of email sending reliable for a live environment or a real bad hack destined to blow up in my face?

Cheers


All times are GMT -5. The time now is 09:45 PM.