RE: How to limit attachment size in postfix

2010-02-04 Thread Arora, Sumit
Using message_size_limit, message size will be limited
But want to limit attachment size, not message size.

-Original Message-
From: J.D. Bronson [mailto:jd_bron...@sbcglobal.net] 
Sent: Thursday, February 04, 2010 5:26 PM
To: Arora, Sumit
Cc: Postfix users
Subject: Re: How to limit attachment size in postfix

in file main.cf:

message_size_limit =

-- 
J.D. Bronson



My postfix server sometimes send command less than 4 alphabets

2010-01-19 Thread Arora, Sumit
Hi,

I'm stuck into a problem.
I'm using content filter, which parses email from my postfix server.
My postfix server sometimes sends a command  which is less than 4 alphabets.

I don't know what to do for that command, as I don't know which command is 
that...
Can anybody tell me, is there any command of less than 4 alphabets, postfix 
sends

Thanks  Regards,
Sumit Arora
IPG RD Hub, Gurgaon
Hewlett-Packard India Software Operation Pvt. Ltd.

Work: x19013
Cell:  +91-9958181104



How can i move email logs from /var/logs to any other directory?

2009-12-21 Thread Arora, Sumit
Hi,

I need to move email logs to /mnt/ currently it is /var/logs/, how can I do 
this?
Please help.

Thanks  Regards,
Sumit Arora
IPG RD Hub, Gurgaon
Hewlett-Packard India Software Operation Pvt. Ltd.

Work: x19013
Cell:  +91-9958181104



Error while installing postfix on 64bit CentOS

2009-12-16 Thread Arora, Sumit
Hi folks,

I'm installing postfix on 64 bit CentOS with mysql and openssl support.

I'm using following command:
make makefiles CCARGS=-DUSE_TLS -I/mnt/Postfix/openssl-0.9.8l/include \
-DHAS_MYSQL -I/mnt/Postfix/mysql-5.1.41-linux-x86_64-glibc23/include \
AUXLIBS=-L/usr/lib64 -lssl -lcrypto \
-L/mnt/Postfix/mysql-5.1.41-linux-x86_64-glibc23/lib -lmysqlclient -lz -lm

make

I get following error:

../../lib/libtls.a(tls_server.o): In function `tls_server_start':
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:647: undefined reference to 
`BIO_set_callback'
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:666: undefined reference to 
`BIO_set_callback'
../../lib/libtls.a(tls_server.o): In function `tls_server_init':
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:318: undefined reference to 
`EVP_MD_size'
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:376: undefined reference to 
`SSL_CTX_set_info_callback'
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:525: undefined reference to 
`SSL_CTX_sess_set_get_cb'
/mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:526: undefined reference to 
`SSL_CTX_sess_set_new_cb'
collect2: ld returned 1 exit status
make: *** [smtpd] Error 1
make: *** [update] Error 1

Any idea?

Thanks  Regards,
Sumit Arora
IPG RD Hub, Gurgaon
Hewlett-Packard India Software Operation Pvt. Ltd.

Work: x19013
Cell:  +91-9958181104



RE: Error while installing postfix on 64bit CentOS

2009-12-16 Thread Arora, Sumit
Actually I want to build postfix with mysql and ssl support, is there any 
package available for this for 64 bit linux?

I have already installed openssl-devel using yum install openssl-devel.


-Original Message-
From: Eero Volotinen [mailto:eero.voloti...@iki.fi] 
Sent: Wednesday, December 16, 2009 5:53 PM
To: Arora, Sumit
Cc: postfix users list
Subject: Re: Error while installing postfix on 64bit CentOS

Quoting Arora, Sumit sumit.ar...@hp.com:

 Hi folks,

 I'm installing postfix on 64 bit CentOS with mysql and openssl support.

 I'm using following command:
 make makefiles CCARGS=-DUSE_TLS -I/mnt/Postfix/openssl-0.9.8l/include \
 -DHAS_MYSQL -I/mnt/Postfix/mysql-5.1.41-linux-x86_64-glibc23/include \
 AUXLIBS=-L/usr/lib64 -lssl -lcrypto \
 -L/mnt/Postfix/mysql-5.1.41-linux-x86_64-glibc23/lib -lmysqlclient -lz -lm

 make

 I get following error:

 ../../lib/libtls.a(tls_server.o): In function `tls_server_start':
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:647: undefined   
 reference to `BIO_set_callback'
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:666: undefined   
 reference to `BIO_set_callback'
 ../../lib/libtls.a(tls_server.o): In function `tls_server_init':
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:318: undefined   
 reference to `EVP_MD_size'
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:376: undefined   
 reference to `SSL_CTX_set_info_callback'
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:525: undefined   
 reference to `SSL_CTX_sess_set_get_cb'
 /mnt/Postfix/postfix-2.6.5/src/tls/tls_server.c:526: undefined   
 reference to `SSL_CTX_sess_set_new_cb'
 collect2: ld returned 1 exit status
 make: *** [smtpd] Error 1
 make: *** [update] Error 1

 Any idea?

 Thanks  Regards,
 Sumit Arora
 IPG RD Hub, Gurgaon
 Hewlett-Packard India Software Operation Pvt. Ltd.

 Work: x19013
 Cell:  +91-9958181104


Do You really need to install from source instead of Centos packages?

You are possibly missing development libraries, openssl-devel (yum  
install openssl-devel)


--
Eero,
RHCE



RE: Error while installing postfix on 64bit CentOS

2009-12-16 Thread Arora, Sumit
Nice catch... 
Thanks a lot
Problem solved by proving same libraries

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Wietse Venema
Sent: Wednesday, December 16, 2009 6:35 PM
To: Postfix users
Subject: Re: Error while installing postfix on 64bit CentOS

Arora, Sumit:
 Hi folks,
 
 I'm installing postfix on 64 bit CentOS with mysql and openssl support.
 
 I'm using following command:
 make makefiles CCARGS=-DUSE_TLS -I/mnt/Postfix/openssl-0.9.8l/include \

You are using include files from /mnt/Postfix/openssl-0.9.8l

 AUXLIBS=-L/usr/lib64 -lssl -lcrypto \

But you are linking with object libraries /usr/lib64/libssl and libcrypto.

Don't do that.

Instead, use the header files that match the object libraries.

Wietse


Which security level should I use?

2009-12-16 Thread Arora, Sumit
I was going through the document for TLS support in postfix, but I don't know 
which security level to use.
My requirement is straight, FULLY SECURE and AVAILABLE FOR EVERYONE.

Which of the following TLS Security level should is use?

none
No TLS.http://www.postfix.org/TLS_README.html#client_tls_none
may
Opportunistic TLS.http://www.postfix.org/TLS_README.html#client_tls_may
encrypt
Mandatory TLS 
encryption.http://www.postfix.org/TLS_README.html#client_tls_encrypt
fingerprint
Certificate fingerprint 
verification.http://www.postfix.org/TLS_README.html#client_tls_fprint
verify
Mandatory server certificate 
verification.http://www.postfix.org/TLS_README.html#client_tls_verify
secure
Secure-channel TLS.http://www.postfix.org/TLS_README.html#client_tls_secure


Please suggest.

Thanks  Regards,
Sumit Arora
IPG RD Hub, Gurgaon
Hewlett-Packard India Software Operation Pvt. Ltd.

Work: x19013
Cell:  +91-9958181104



Do i need any secure channel, if i'm using postfix to receive email only?

2009-12-01 Thread Arora, Sumit
Hi folks,

I'm using postfix for just receiving emails from network, do I need to enable 
TLS or anything else for building up a secure channel.
I guess all this is required in case of my email clients connecting to my email 
server.

Thanks  Regards,
Sumit Arora
IPG RD Hub, Gurgaon
Hewlett-Packard India Software Operation Pvt. Ltd.

Work: x19013
Cell:  +91-9958181104



4KB of disk space burning on a single email

2009-11-20 Thread Arora, Sumit
Hi folks,

I'm just testing my postfix server for load and disk usage.
I'm using content filter on some another server, and I don't feed the email 
back to postfix.

Email data is getting deleted from my postfix server, but I don't know where 
4KB of my disk space gone on every email my postfix server receives.
If anybody have some idea, please tell me.

-Sumit Arora


RE: 4KB of disk space burning on a single email

2009-11-20 Thread Arora, Sumit
You are right Joost, 4KB will be the block size...
But my question is who is taking this disk space, because email is deleted 
already.

Is this any log or what I just have to stop consumption of any kind of disk 
space except mail logs.

Please help

-Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of J. Roeleveld
Sent: Friday, November 20, 2009 6:26 PM
To: postfix-users@postfix.org
Subject: Re: 4KB of disk space burning on a single email

On Friday 20 November 2009 13:42:58 Arora, Sumit wrote:
 Hi folks,
 
 I'm just testing my postfix server for load and disk usage.
 I'm using content filter on some another server, and I don't feed the email
  back to postfix.
 
 Email data is getting deleted from my postfix server, but I don't know
  where 4KB of my disk space gone on every email my postfix server receives.
  If anybody have some idea, please tell me.
 
 -Sumit Arora
 

My guess is that the filesystem has a block-size of 4KB.

A file is stored over a set of blocks of this size. Which means that if a file 
is smaller then 4KB, it will still use a 4KB block.

As far as I know, only reiserfs has the notailoption which will try to stick 
multiple smaller files into a single block.

--
Joost


RE: 4KB of disk space burning on a single email

2009-11-20 Thread Arora, Sumit
I'm really amazed... its maillog that is consuming 4KB on a simple 5-7 line 
logging for each email

-Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of J. Roeleveld
Sent: Friday, November 20, 2009 6:51 PM
To: postfix-users@postfix.org
Subject: Re: 4KB of disk space burning on a single email

On Friday 20 November 2009 14:14:03 Arora, Sumit wrote:
 You are right Joost, 4KB will be the block size...
 But my question is who is taking this disk space, because email is deleted
  already.
 
 Is this any log or what I just have to stop consumption of any kind of
  disk space except mail logs.
 
 Please help
 
 -Sumit Arora

4K on logs per email are quite a lot. Unless you have really verbose logging.
Unless your system logger is duplicating messages over several logfiles?

Possible places to look:
/var/spool/.
/tmp/
/var/tmp/

Maybe something leave temporary files, or maybe your postfix is keeping files 
in a spool-directory.

Maybe try the following to see where additional files are placed:

du /  PRE-newemail.txt
have postfix parse a few emails
du /  POST-newemail.txt

Then do a diff on these 2 text-files to see which directories had an increase.
Hopefully, this will reduce the possible locations to check for possible 
locations.

--
Joost

 
 -Original Message-
 From: owner-postfix-us...@postfix.org
  [mailto:owner-postfix-us...@postfix.org] On Behalf Of J. Roeleveld Sent:
  Friday, November 20, 2009 6:26 PM
 To: postfix-users@postfix.org
 Subject: Re: 4KB of disk space burning on a single email
 
 On Friday 20 November 2009 13:42:58 Arora, Sumit wrote:
  Hi folks,
 
  I'm just testing my postfix server for load and disk usage.
  I'm using content filter on some another server, and I don't feed the
  email back to postfix.
 
  Email data is getting deleted from my postfix server, but I don't know
   where 4KB of my disk space gone on every email my postfix server
  receives. If anybody have some idea, please tell me.
 
  -Sumit Arora
 
 My guess is that the filesystem has a block-size of 4KB.
 
 A file is stored over a set of blocks of this size. Which means that if a
  file is smaller then 4KB, it will still use a 4KB block.
 
 As far as I know, only reiserfs has the notailoption which will try to
  stick multiple smaller files into a single block.
 
 --
 Joost
 


RE: 4KB of disk space burning on a single email

2009-11-20 Thread Arora, Sumit
It's being passed for content filtering and email is not sent back to postfix.
For postfix it's just mail forwarding

-Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Ralf Hildebrandt
Sent: Friday, November 20, 2009 7:11 PM
To: postfix-users@postfix.org
Subject: Re: 4KB of disk space burning on a single email

* Arora, Sumit sumit.ar...@hp.com:
 You are right Joost, 4KB will be the block size...
 But my question is who is taking this disk space, because email is deleted 
 already.

How EXACTLY is the email being deleted ?

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



RE: 4KB of disk space burning on a single email

2009-11-20 Thread Arora, Sumit
I've checked the size of maillog
It's size is getting increased by 4KB on receiving each email.

Noel Jones, please read the other emails of this thread.

-Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Noel Jones
Sent: Friday, November 20, 2009 7:20 PM
To: postfix-users@postfix.org
Subject: Re: 4KB of disk space burning on a single email

On 11/20/2009 7:44 AM, Arora, Sumit wrote:
 It's being passed for content filtering and email is not sent back to postfix.
 For postfix it's just mail forwarding


Amavisd-new (and probably other content filters too) keeps 
temporary files between messages to prevent creating new files 
every time a mail comes in.

Sounds as if you're chasing a problem that doesn't exist.

  -- Noel Jones


RE: Required sender email address while table lookup for rejecting mails for unknown local users

2009-11-11 Thread Arora, Sumit
Hi Magnus,

Thanks for replying...

Yup, I know about spoofing and I'm taking care of it in my system.

So let's assume that user is not spoofed.

Now I have scenario: Only some users can send email to particular user.
When I receive email on postfix, I just want to query: Is this sender can send 
email to this receiver?

So again my question is, how can I have sender email address during validation 
of local_recipient_maps?

Many Thanks,
Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Magnus Bäck
Sent: Wednesday, November 11, 2009 1:41 AM
To: postfix-users@postfix.org
Subject: Re: Required sender email address while table lookup for rejecting 
mails for unknown local users

On Tuesday, November 10, 2009 at 07:49 CET,
 Arora, Sumit sumit.ar...@hp.com wrote:

 I'm using mysql local_recipient_maps for rejecting email for unknown
 local users.
 
 Here are the changes in my main.cf
 
 local_recipient_maps = proxy:unix:passwd.byname $alias_maps 
 virtual_alias_maps = mysql:/etc/postfix/mysql-relays.cf

I assume this should be:

local_recipient_maps = proxy:unix:passwd.byname $alias_maps
virtual_alias_maps = mysql:/etc/postfix/mysql-relays.cf

 Here is my mysql-relays.cf
 
 hosts=16.123.123.123
 user=root
 password=*
 dbname=testDB
 table=users
 query = select emailaddress from users where emailaddress='%s'
 
 I'm able to query successfully.
 
 But I'm stuck as my requirement is to query database according to sender.
 
 Let's say some user with emailaddress 'sen...@myhostname.com' is
 sending email to my postfix and I need to validate him.

What does validate the sender mean? Check that the sender address, if
it's one of your own domains, is a valid recipient address? Only allow a
select number of sender addresses? Please be more complete.

You do know that sender addresses are easily spoofed?

[...]

-- 
Magnus Bäck
mag...@dsek.lth.se


RE: Required sender email address while table lookup for rejecting mails for unknown local users

2009-11-10 Thread Arora, Sumit
Sorry!! Could not find anything relevant

Need help!

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of suomi
Sent: Tuesday, November 10, 2009 3:05 PM
To: postfix-users@postfix.org
Subject: Re: Required sender email address while table lookup for rejecting 
mails for unknown local users

man pipe

suomi

On 2009-11-10 07:49, Arora, Sumit wrote:
 Hi folks,

 I'm using mysql local_recipient_maps for rejecting email for unknown
 local users.

 Here are the changes in my main.cf

 local_recipient_maps = proxy:unix:passwd.byname $alias_maps
 virtual_alias_maps = mysql:/etc/postfix/mysql-relays.cf

 Here is my mysql-relays.cf

 hosts=16.123.123.123

 user=root

 password=*

 dbname=testDB

 table=users

 query = select emailaddress from users where emailaddress='%s'

 I'm able to query successfully.

 But I'm stuck as my requirement is to query database according to sender.

 Let's say some user with emailaddress 'sen...@myhostname.com' is sending
 email to my postfix and I need to validate him.

 query = select emailaddress from users where emailaddress='%s' 
 allowedusers='sen...@myhostname.com'

 Can anybody suggest me how can I get the sender email address in
 mysql-relays.cf on runtime.

 Thanks,

 Sumit Arora



Required sender email address while table lookup for rejecting mails for unknown local users

2009-11-09 Thread Arora, Sumit
Hi folks,

I'm using mysql local_recipient_maps for rejecting email for unknown local 
users.

Here are the changes in my main.cf

local_recipient_maps = proxy:unix:passwd.byname $alias_maps
virtual_alias_maps = mysql:/etc/postfix/mysql-relays.cf

Here is my mysql-relays.cf

hosts=16.123.123.123
user=root
password=*
dbname=testDB
table=users
query = select emailaddress from users where emailaddress='%s'

I'm able to query successfully.

But I'm stuck as my requirement is to query database according to sender.
Let's say some user with emailaddress 'sen...@myhostname.com' is sending email 
to my postfix and I need to validate him.

query = select emailaddress from users where emailaddress='%s'  
allowedusers='sen...@myhostname.com'

Can anybody suggest me how can I get the sender email address in 
mysql-relays.cf on runtime.

Thanks,
Sumit Arora


Required sender email address while table lookup for rejecting mails for unknown local users

2009-11-09 Thread Arora, Sumit
Hi folks,



I'm using mysql local_recipient_maps for rejecting email for unknown local 
users.



Here are the changes in my main.cf



local_recipient_maps = proxy:unix:passwd.byname $alias_maps virtual_alias_maps 
= mysql:/etc/postfix/mysql-relays.cf



Here is my mysql-relays.cf



hosts=16.123.123.123

user=root

password=*

dbname=testDB

table=users

query = select emailaddress from users where emailaddress='%s'



I'm able to query successfully.



But I'm stuck as my requirement is to query database according to sender.

Let's say some user with emailaddress 'sen...@myhostname.com' is sending email 
to my postfix and I need to validate him.



query = select emailaddress from users where emailaddress='%s'  
allowedusers='sen...@myhostname.com'



Can anybody suggest me how can I get the sender email address in 
mysql-relays.cf on runtime.



Thanks,

Sumit Arora



How to accept incoming emails only to the users listed in my application's mysql database

2009-10-22 Thread Arora, Sumit
Hi All,

I was wondering if I can accept only those emails addressed to the users listed 
in a table of my application database.
Can anybody suggest smthing.

Thanks,
Sumit Arora


Getting email multiple times in content filter

2009-09-29 Thread Arora, Sumit
Hi All,

I'm using smtp content filter, I'm getting same email multiple times on my smtp 
content filter.

Can anyone tell me how to limit postfix to send email to content filter.

Thanks,
Sumit Arora


Please reply to my email......

2009-09-25 Thread Arora, Sumit
Can anybody answer my question...  

Thanks

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Arora, Sumit
Sent: Thursday, September 24, 2009 6:09 PM
To: postfix-users@postfix.org
Subject: How to convert message received on postfix filter to javamail mutipart 
message


I'm using SMTP content filter in my postfix smtp server, I'm receiving raw 
message on my
SMTP filter like:
Mail From, RCPT TO, DATA

Now I need to convert this message into javamail multipart message.

Is there any good way to convert into it.

Thanks,
Sumit Arora


How to convert message received on postfix filter to javamail mutipart message

2009-09-24 Thread Arora, Sumit

I'm using SMTP content filter in my postfix smtp server, I'm receiving raw 
message on my
SMTP filter like:
Mail From, RCPT TO, DATA

Now I need to convert this message into javamail multipart message.

Is there any good way to convert into it.

Thanks,
Sumit Arora


RE: How to receive email on my postfix server

2009-09-22 Thread Arora, Sumit
Thanks a lot Ansgar,

I have installed procmail, I have some question regarding this.
As you said: 

Create a file .procmailrc with the following content in your $HOME
(assuming your mailbox format is mbox):

- sorry I couldn't understand what is $HOME here, are you talking about /home/ ?

And my another question is, how MY_PROGRAM will look like, can you please give 
me some example code.
Is it can be a java program or in any other language.


Thanks,
Sumit Arora

 
-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Ansgar Wiechers
Sent: Friday, September 18, 2009 4:33 AM
To: postfix-users@postfix.org
Subject: Re: How to receive email on my postfix server

On 2009-09-17 Arora, Sumit wrote:
 Here are my requirements:
 - I have to setup my own SMTP server to receive emails (I chose
   postfix, sm body referred me)
 - Then I have to pass the email body and attachments to a component to
   process it.
 - My postfix server should be able to receive all emails sent to my
   domain name e.g. anyth...@mydomain.com
 - It is preferred that there should not be any time gap between I
   receive email and process them, so probably I cannot have any other
   small smtp server to fetch emails from my postfix server.

Sounds like a job for procmail, IMO.

Install procmail and add the following line to your main.cf:

mailbox_command = procmail -a $EXTENSION

Create a file .procmailrc with the following content in your $HOME
(assuming your mailbox format is mbox):

8
MAILDIR=$HOME/Mail  # Make sure the directory exists!
DEFAULT=$MAILDIR/inbox
LOCKFILE=$HOME/.lockmail

# Remove the following two lines when everything is working as expected,
# lest the log will grow VERY BIG VERY FAST.
LOGFILE=$HOME/procmail.log
VERBOSE=on

:0 fhw
| formail -I  -s YOUR_PROGRAM
8

This will deliver all your incoming mail to your local mailbox while
feeding the mailbodies to your program.

 - By security perspective, my postfix server should be able to do
   anti-spoofing and stop junk emails.

http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt

 Here is the output of postconf -n
[...]
 inet_interfaces = 16.150.18.223, $myhostname, localhost

inet_interfaces = 16.150.18.223, 127.0.0.1

Regards
Ansgar Wiechers
-- 
Abstractions save us time working, but they don't save us time learning.
--Joel Spolsky


How to receive email on my postfix server

2009-09-17 Thread Arora, Sumit
I have some doubt in receiving email.

What I understand I just need one domain name associated with my server ip 
address, 
and I need to enter this domain in postfix configuration. That's it.

I don't need to send emails from this server.

I guess that is all I need, can anybody confirm it?

Thanks,
Sumit Arora


RE: How to receive email on my postfix server

2009-09-17 Thread Arora, Sumit
What I understand Postfix is a smtp server, it will also receive emails.
What I need is, postfix to receive emails and my component will process those 
emails, i don't need to receive emails from my postfix server.

-Sumit

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Patrick Ben Koetter
Sent: Thursday, September 17, 2009 2:18 PM
To: postfix-users@postfix.org
Subject: Re: How to receive email on my postfix server

* Arora, Sumit sumit.ar...@hp.com:
 I have some doubt in receiving email.

Postfix is a SMTP server. It transports (read: sends) messages.
If you want to receive messages you need an IMAP or POP server such as
Dovecot, Courier, Cyrus IMAP or ...

p...@rick



 
 What I understand I just need one domain name associated with my server ip 
 address, 
 and I need to enter this domain in postfix configuration. That's it.
 
 I don't need to send emails from this server.
 
 I guess that is all I need, can anybody confirm it?
 
 Thanks,
 Sumit Arora

-- 
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
http://postfix.state-of-mind.de/patrick.koetter/saslfinger/


RE: How to receive email on my postfix server

2009-09-17 Thread Arora, Sumit
Thanks a lot Patrick.

Here are my requirements:
- I have to setup my own SMTP server to receive emails (I chose 
postfix, sm body referred me)
- Then I have to pass the email body and attachments to a component to 
process it.
- My postfix server should be able to receive all emails sent to my 
domain name e.g. anyth...@mydomain.com
- It is preferred that there should not be any time gap between I 
receive email and process them, so probably I cannot have any other small smtp  
server to fetch emails from my postfix server.
- By security perspective, my postfix server should be able to do 
anti-spoofing and stop junk emails.
- There is no requirement of sending email from my postfix server. 

Here is the output of postconf -n

[r...@sarora postfix]# postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = 16.150.18.223, $myhostname, localhost
local_recipient_maps = 
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = sarora.com
myhostname = sarora.com
mynetworks_style = subnet
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
proxy_interfaces = 16.212.0.103:8080
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550


Many Thanks,
Sumit Arora

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Patrick Ben Koetter
Sent: Thursday, September 17, 2009 2:50 PM
To: postfix-users@postfix.org
Subject: Re: How to receive email on my postfix server

* Arora, Sumit sumit.ar...@hp.com:
 What I understand Postfix is a smtp server, it will also receive emails.

correct.

 What I need is, postfix to receive emails and my component will process
 those emails, i don't need to receive emails from my postfix server.

Postfix can do that for you.

Postfix basically runs out of the box. It will impersonate as your hosts
hostname unless you configure it differently and accept messages for users
that have an account on your server and will put them into
/var/mail/username unless you specify something else.

You could, for example, create an alias in (usually) /etc/aliases and pipe the
incoming message to a script. You could also write your own little SMTP server
and have Postfix send incoming messages to your server and it does whatever
you instruct it to do with the message.

You might need to configure the inet_interfaces parameter, since some OS
vendors set it to listen on localhost only.

But before I go on...

Tell us what the setup you need is and send us output from postconf -n and
we will be able to help you a lot better than now.

p...@rick


 
 -Sumit
 
 -Original Message-
 From: owner-postfix-us...@postfix.org 
 [mailto:owner-postfix-us...@postfix.org] On Behalf Of Patrick Ben Koetter
 Sent: Thursday, September 17, 2009 2:18 PM
 To: postfix-users@postfix.org
 Subject: Re: How to receive email on my postfix server
 
 * Arora, Sumit sumit.ar...@hp.com:
  I have some doubt in receiving email.
 
 Postfix is a SMTP server. It transports (read: sends) messages.
 If you want to receive messages you need an IMAP or POP server such as
 Dovecot, Courier, Cyrus IMAP or ...
 
 p...@rick
 
 
 
  
  What I understand I just need one domain name associated with my server ip 
  address, 
  and I need to enter this domain in postfix configuration. That's it.
  
  I don't need to send emails from this server.
  
  I guess that is all I need, can anybody confirm it?
  
  Thanks,
  Sumit Arora
 
 -- 
 All technical questions asked privately will be automatically answered on the
 list and archived for public access unless privacy is explicitely required and
 justified.
 
 saslfinger (debugging SMTP AUTH):
 http://postfix.state-of-mind.de/patrick.koetter/saslfinger/

-- 
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
http://postfix.state-of-mind.de/patrick.koetter/saslfinger/


RE: Need help to forward emails to my java function

2009-09-16 Thread Arora, Sumit
Sorry my subject was not descriptive...

From: Daniel V. Reinhardt [mailto:crypto...@yahoo.com]
Sent: Tuesday, September 15, 2009 7:02 PM
To: Arora, Sumit; Postfix users
Subject: Re: Need help to forward emails




Hi All,

I need to execute my code when I receive email on my postfix smtp server.

Sorry I couldn't understand what Wietse said:
You can pipe-to-command with ~/.forward (see man 5 aliases) and with the 
pipe(8) delivery agent (see man 8 pipe).

Can anybody tell me what I can do if I want to execute my java function when I 
receive email.
Also I need my whole email content in my java function.

It will be great if anyone can show me some examples.

Many Thanks,
Sumit Arora



--

My Reply


You can add another email address to the aliases file if you are running just 
straight postfix with no modifications like so:

root: u...@somehost.com

that would forward roots email to u...@somehost.com

Thanks,
Daniel



how to pipe the received emails to my java function

2009-09-16 Thread Arora, Sumit
Hi All,

I need to execute my code when I receive email on my postfix smtp server.

Can anybody tell me what I can do if I want to execute my java function when I 
receive email.
Also I need my whole email content in my java function.

It will be great if anyone can show me some examples.

Many Thanks,
Sumit Arora





RE: how to pipe the received emails to my java function

2009-09-16 Thread Arora, Sumit
Thanks p...@rick..

I read man 8 pipe..

And what I understand is, I need to change the configuration somewhere here in 
master.cf:

# 
#
# Other external delivery methods.
#
#ifmailunix  -   n   n   -   -   pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp unix  -   n   n   -   -   pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop 
$recipient
#
#scalemail-backend unix -   n   n   -   2   pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -   n   n   -   -   pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}


Can I use .sh script here?

Thanks,
Sumit Arora


-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Patrick Ben Koetter
Sent: Wednesday, September 16, 2009 1:53 PM
To: postfix-users@postfix.org
Subject: Re: how to pipe the received emails to my java function

* Arora, Sumit sumit.ar...@hp.com:
 Thanks Erwan
 
 As I'm new to postfix I couldn't understand what u said, I googled it but
 didn't get any result useful to me.

Have you read man 8 pipe yet? 

 Can u plz explain with some examples..

You can find some examples in /etc/postfix/master.cf. Look for commands that
specify pipe in the command column.

p...@rick



 
 Many Thanks,
 Sumit Arora
 
 -Original Message-
 From: owner-postfix-us...@postfix.org 
 [mailto:owner-postfix-us...@postfix.org] On Behalf Of Erwan David
 Sent: Wednesday, September 16, 2009 12:44 PM
 To: postfix-users@postfix.org
 Subject: Re: how to pipe the received emails to my java function
 
 On Wed, Sep 16, 2009 at 09:10:01AM CEST, Arora, Sumit sumit.ar...@hp.com 
 said:
  Hi All,
  
  I need to execute my code when I receive email on my postfix smtp server.
  
  Can anybody tell me what I can do if I want to execute my java function 
  when I receive email.
  Also I need my whole email content in my java function.
  
  It will be great if anyone can show me some examples.
 
 Look at the pipe transport, its purpose is exactly to pipe mail to an
 external program.
 
 -- 
 Erwan

-- 
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
http://postfix.state-of-mind.de/patrick.koetter/saslfinger/


Where i can see the received emails

2009-09-16 Thread Arora, Sumit
I have done the basic configuration of postfix on my fedora10.

Can anybody tell me where I can see the received emails.
Do I need to setup any database for storing emails?

I just want to be sure that I'm getting emails or not.

Thanks,
Sumit Arora


Need help to forward emails

2009-09-15 Thread Arora, Sumit
Hi All,

I need to execute my code when I receive email on my postfix smtp server.

Sorry I couldn't understand what Wietse said:
You can pipe-to-command with ~/.forward (see man 5 aliases) and with the 
pipe(8) delivery agent (see man 8 pipe). 

Can anybody tell me what I can do if I want to execute my java function when I 
receive email.
Also I need my whole email content in my java function.

It will be great if anyone can show me some examples.

Many Thanks,
Sumit Arora


Need help to change the Postfix code

2009-09-14 Thread Arora, Sumit
Hi All,

I'm new to postfix, I need to execute my code when I receive a new email on my 
postfix smtp server.
Please give me some idea, where I can get the postfix code documentation so 
that I can change its code.

All and any type of suggestions are most welcome, I'll really appreciate.

Thanks in advance,
Sumit Arora


RE: Need help to change the Postfix code

2009-09-14 Thread Arora, Sumit
Thanks egoitz  Ram.

Actually I don't need the whole functionality of Postfix, I also need to cut 
the code for my requirement only.
My requirement is to just receive the email and send the body and attachments 
to another component.
There is no requirement of sending any email from my postfix server.

Now my question is, is it worth to cut the code and use the only module which I 
need or I should go with the whole postfix?

Many Thanks,
Sumit Arora


-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of ego...@ramattack.net
Sent: Monday, September 14, 2009 6:30 PM
To: postfix-users@postfix.org
Subject: Re: Need help to change the Postfix code

 Hi All,

 I'm new to postfix, I need to execute my code when I receive a new email
 on my postfix smtp server.
 Please give me some idea, where I can get the postfix code documentation
 so that I can change its code.

Depending on what the code does... you could run a script passing content
to it via pipe in master.cf. This way is like maildrop mda works for
example.

What exactly does you're code?.


 All and any type of suggestions are most welcome, I'll really appreciate.

 Thanks in advance,
 Sumit Arora


Ram wrote:

To change postfix code for such a thing is absolutely unnecessary 

You can run a custom script in postfix by piping the mail to a script via 
aliases , or a master.cf entry