Networking Forums

Networking Forums > Computer Networking > Linux Networking > postfix pickup folder

Reply
Thread Tools Display Modes

postfix pickup folder

 
 
Pedro M. Leite
Guest
Posts: n/a

 
      09-02-2011, 09:10 AM
Good Morning

Centos 5.5 + postfix 2.3.3
Scenario : Send Mail from mysql
I am running a mysql database thar has to send email on certain events.
it is working via incrond folder monitoring and a sendmail wrapper.

basically, a stored procedure selects the email source text into a
folder and then incrod takes over. it works.

now, i want postfix to directly pickup and send the email.
i have written the file to /var/spool/postfix/pickup but there is no
pickup. the headers are terminated with /r/n and the file name is
email100. user mysql belongs to postfix group.

can anyone help me on this one ??
thank you and have a nice day.
PLeite

This is a transcript of the mysql generated file ::
(There are some trailing white spaces) could the be the reason ??

To: (E-Mail Removed)
From: (E-Mail Removed)
Subject: test email
Date: 2 Sep 2011 10:07:05 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0000_01CA4B3F.8C263EE0"
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01CA4B3F.8C263EE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


email body - from mysql


------=_NextPart_000_0000_01CA4B3F.8C263EE0
Content-Type: text/html
Content-Transfer-Encoding: 7bit

email body - from mysql
------=_NextPart_000_0000_01CA4B3F.8C263EE0--
 
Reply With Quote
 
 
 
 
Jorgen Grahn
Guest
Posts: n/a

 
      09-02-2011, 10:32 AM
On Fri, 2011-09-02, Pedro M. Leite wrote:
> Good Morning
>
> Centos 5.5 + postfix 2.3.3
> Scenario : Send Mail from mysql
> I am running a mysql database thar has to send email on certain events.
> it is working via incrond folder monitoring and a sendmail wrapper.
>
> basically, a stored procedure selects the email source text into a
> folder and then incrod takes over. it works.
>
> now, i want postfix to directly pickup and send the email.
> i have written the file to /var/spool/postfix/pickup but there is no
> pickup. the headers are terminated with /r/n and the file name is
> email100. user mysql belongs to postfix group.


That will not work. The simple, correct way to send mail on any Unix
is to pipe it into the sendmail(1) utility.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Pedro M. Leite
Guest
Posts: n/a

 
      09-02-2011, 03:22 PM
Em 02-09-2011 11:32, Jorgen Grahn escreveu:
> On Fri, 2011-09-02, Pedro M. Leite wrote:
>> Good Morning
>>
>> Centos 5.5 + postfix 2.3.3
>> Scenario : Send Mail from mysql
>> I am running a mysql database thar has to send email on certain events.
>> it is working via incrond folder monitoring and a sendmail wrapper.
>>
>> basically, a stored procedure selects the email source text into a
>> folder and then incrod takes over. it works.
>>
>> now, i want postfix to directly pickup and send the email.
>> i have written the file to /var/spool/postfix/pickup but there is no
>> pickup. the headers are terminated with /r/n and the file name is
>> email100. user mysql belongs to postfix group.

>
> That will not work. The simple, correct way to send mail on any Unix
> is to pipe it into the sendmail(1) utility.
>
> /Jorgen
>

Good Afternoon.
Thanks, thought so, did and its working, i just wanted to make it
simpler, if possible.

Have a nice day and a nice weekend.
PLeite
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a

 
      09-05-2011, 07:26 AM
On Fri, 2011-09-02, Pedro M. Leite wrote:
> Em 02-09-2011 11:32, Jorgen Grahn escreveu:
>> On Fri, 2011-09-02, Pedro M. Leite wrote:
>>> Good Morning
>>>
>>> Centos 5.5 + postfix 2.3.3
>>> Scenario : Send Mail from mysql
>>> I am running a mysql database thar has to send email on certain events.
>>> it is working via incrond folder monitoring and a sendmail wrapper.
>>>
>>> basically, a stored procedure selects the email source text into a
>>> folder and then incrod takes over. it works.
>>>
>>> now, i want postfix to directly pickup and send the email.
>>> i have written the file to /var/spool/postfix/pickup but there is no
>>> pickup. the headers are terminated with /r/n and the file name is
>>> email100.


>>> user mysql belongs to postfix group.


You might want to remove it from there -- as far as I can tell only
postfix itself should be in the postfix group; its security might be
compromised otherwise.

>> That will not work. The simple, correct way to send mail on any Unix
>> is to pipe it into the sendmail(1) utility.
>>
>> /Jorgen
>>

> Good Afternoon.
> Thanks, thought so, did and its working, i just wanted to make it
> simpler, if possible.


I don't think it can be made any simpler, if you want it robust, safe
and portable. Performance-wise there's the cost of executing
sendmail(1) once per mail, but I believe that's a problem only under
extreme conditions.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Pedro M. Leite
Guest
Posts: n/a

 
      09-05-2011, 11:13 AM
Em 05-09-2011 08:26, Jorgen Grahn escreveu:
> On Fri, 2011-09-02, Pedro M. Leite wrote:
>> Em 02-09-2011 11:32, Jorgen Grahn escreveu:
>>> On Fri, 2011-09-02, Pedro M. Leite wrote:
>>>> Good Morning
>>>>
>>>> Centos 5.5 + postfix 2.3.3
>>>> Scenario : Send Mail from mysql
>>>> I am running a mysql database thar has to send email on certain events.
>>>> it is working via incrond folder monitoring and a sendmail wrapper.
>>>>
>>>> basically, a stored procedure selects the email source text into a
>>>> folder and then incrod takes over. it works.
>>>>
>>>> now, i want postfix to directly pickup and send the email.
>>>> i have written the file to /var/spool/postfix/pickup but there is no
>>>> pickup. the headers are terminated with /r/n and the file name is
>>>> email100.

>
>>>> user mysql belongs to postfix group.

>
> You might want to remove it from there -- as far as I can tell only
> postfix itself should be in the postfix group; its security might be
> compromised otherwise.
>
>>> That will not work. The simple, correct way to send mail on any Unix
>>> is to pipe it into the sendmail(1) utility.
>>>
>>> /Jorgen
>>>

>> Good Afternoon.
>> Thanks, thought so, did and its working, i just wanted to make it
>> simpler, if possible.

>
> I don't think it can be made any simpler, if you want it robust, safe
> and portable. Performance-wise there's the cost of executing
> sendmail(1) once per mail, but I believe that's a problem only under
> extreme conditions.
>
> /Jorgen
>

Good morning
Thank you for the update
i had to add mysql to allow writing to the puckup folder, but its gone
now, since i am using the incrond and sendmail approach.
its simple, its working, the KISS approach is usually better !!!!!
the email traffic is low, so there is no problem performance and
bottleneck wise.

thank you and have a nice day
Best Regards
PLeite
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RECYCLER folder into user's home folder? Claude Lachapelle Windows Networking 1 05-05-2008 04:03 PM
Can't get clients to pickup address from 2003 dhcp server Kamerynn Windows Networking 2 08-19-2005 10:56 AM
Wireless connection won't pickup ip at boot up dan@hotmail.com Wireless Internet 1 07-02-2004 12:31 AM
postfix + cyrus IMAP: central sent-mail folder on IMAP server Thomas Schamberg Linux Networking 0 01-08-2004 01:31 PM
comparison of wireless NICs ability to pickup a signal DigitalVinyl Wireless Internet 0 11-13-2003 02:37 PM



1 2 3 4 5 6 7 8 9 10 11