LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2008, 07:33 AM   #1
linux_the_greatest
LQ Newbie
 
Registered: Aug 2008
Posts: 5

Rep: Reputation: 0
Question MTAs( Mail transfer agents)


Hi,
I would like to run two MTAs on one machine. Is it possible.
If yes,then how do i go about? Thanks

Last edited by linux_the_greatest; 08-14-2008 at 07:37 AM.
 
Old 08-14-2008, 07:35 AM   #2
garyalex
Member
 
Registered: Jun 2006
Location: Johannesburg, South Africa
Distribution: Ubuntu, CentOS, Debian
Posts: 47

Rep: Reputation: 15
Anything's possible

Why would you want to though?

You wouldn't be able to share the same IP and port though...
 
Old 08-14-2008, 08:06 AM   #3
linux_the_greatest
LQ Newbie
 
Registered: Aug 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I am currently using postfix as my MTA and i would like to put some restrictions in place for some particular users. Postfix can't do that.So that is why i want to run two MTAs on one server.
About the ports i can always change the port numbers and have two network cards i.e two IP address for one Server.
 
Old 08-14-2008, 08:37 AM   #4
garyalex
Member
 
Registered: Jun 2006
Location: Johannesburg, South Africa
Distribution: Ubuntu, CentOS, Debian
Posts: 47

Rep: Reputation: 15
What restrictions do you want to put in for the users by the way?
 
Old 08-14-2008, 08:45 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by linux_the_greatest View Post
Hi,
I would like to run two MTAs on one machine. Is it possible
Not two MTAs on the same port! And you can't have a single MX record pointing two both of the MTAs anyway. So the question doesn't really make sense.

Quote:
Originally Posted by linux_the_greatest View Post
i would like to put some restrictions in place for some particular users. Postfix can't do that.
Of course it can. What restrictions?
 
Old 08-15-2008, 12:53 AM   #6
linux_the_greatest
LQ Newbie
 
Registered: Aug 2008
Posts: 5

Original Poster
Rep: Reputation: 0
My MTA is postfix and currently i have 120 users.I want to restrict 100 user from sending mail above 1MB. If i do put the restriction then everyone if affected which isn't my intention. That is why i asked if i can run two MTAs on the same machine,have two network card with different IP addresses and Both MTAs have different Port numbers. Yes all point to the same MX record.
 
Old 08-15-2008, 01:56 AM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Use a policy daemon such as policyd.
 
Old 08-15-2008, 02:16 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Not opining on the benefits of the various approaches, but it's pretty easy to run multiple instances of postfix on one machine. You simply copy the relevant part of /etc/postfix to, say, /etc/postfix1, and create a new startup/shutdown to start postfix with "postfix -c /etc/postfix1 start", etc.. I did this some time ago, more as a exercise for some reason I don't recall, but it definitely works.

See man postfix.
 
Old 08-15-2008, 02:29 AM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
...and a separate set of queues (separate instances must have different queues).

You can use restriction classes to do certain things, but message_size_limit is global. What do you do with multi-recipient messages, where one user has a limit and one doesn't? You can't reject the message until the entire message has been received ( to know the size ). Once you've received the message (you've accepted it),you can't reject it for some, but not others.

See: http://groups.google.com/group/list....2a7716f8a444a2
 
Old 08-15-2008, 03:06 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Not sure if that was directed at me, but you get the whole kit and kaboodle duplicated, so it's equivalent to running on a different server.

Note that the OP is wanting to restrict sent message sizes, not received by the look of things btw
 
Old 08-15-2008, 06:24 AM   #11
linux_the_greatest
LQ Newbie
 
Registered: Aug 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks guys.let me try policyd then revert.
 
Old 08-15-2008, 09:28 AM   #12
garyalex
Member
 
Registered: Jun 2006
Location: Johannesburg, South Africa
Distribution: Ubuntu, CentOS, Debian
Posts: 47

Rep: Reputation: 15
You can try MailScanner which integrates with postfix. It can check message sizes and send friendly rejection messages when the limit is reached. It also has antispam and antivirus features.
 
Old 08-15-2008, 12:26 PM   #13
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by billymayday View Post
Not sure if that was directed at me, but you get the whole kit and kaboodle duplicated, so it's equivalent to running on a different server.
It isn't clear to everyone that a separate set of queues is required. I just added to your description to clarify for others. The ellipses were added to suggest that the addition is what you would have said.
Quote:
Originally Posted by billymayday View Post
Note that the OP is wanting to restrict sent message sizes, not received by the look of things btw
The message_size_limit parameter is a cleanup(8)/smtpd(8) parameter, and as such controls the size limit of all messages entering into postfix. Hence, it is inbound and outbound.

Code:
main.cf
  message_size_limit = 50000
Eg: via sendmail:
Code:
Aug 15 10:14:42 mrc postfix/postdrop[5918]: warning: uid=0: File too large
Aug 15 10:14:42 mrc postfix/sendmail[5917]: fatal: root(0): message file too big
Eg: via SMTP:
Code:
Aug 15 10:21:51 mrc postfix/smtpd[6429]: connect from localhost[127.0.0.1]
Aug 15 10:21:51 mrc postfix/smtpd[6429]: 5FB51C8246: client=localhost[127.0.0.1]
Aug 15 10:21:51 mrc postfix/cleanup[6434]: 5FB51C8246: message-id=<1218820910.6264.0.camel@mrc>
Aug 15 10:21:51 mrc postfix/smtpd[6429]: warning: 5FB51C8246: queue file size limit exceeded
Aug 15 10:21:51 mrc postfix/smtpd[6429]: disconnect from localhost[127.0.0.1]

Last edited by Mr. C.; 08-15-2008 at 12:38 PM.
 
Old 08-15-2008, 03:24 PM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by Mr. C. View Post
It isn't clear to everyone that a separate set of queues is required. I just added to your description to clarify for others. The ellipses were added to suggest that the addition is what you would have said.
That's fine - I hadn't taken any offence btw

Quote:
Originally Posted by Mr. C. View Post
The message_size_limit parameter is a cleanup(8)/smtpd(8) parameter, and as such controls the size limit of all messages entering into postfix. Hence, it is inbound and outbound.
I was really only responding to the reject point - the presence of multiple recipients doesn't matter if the restriction is intended for outgoing messages since if it's over the limit it gets rejected period, but it could get messy on inbound

It'll be interesting to see how the pilicyd goes. Hopefully it will get posted.

Last edited by billymayday; 08-15-2008 at 03:25 PM.
 
Old 08-15-2008, 04:14 PM   #15
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Rep: Reputation: 15
Are you set in your ways on using postfix? I prefer qmail for smtp relays. You can accomplish what you would like to do with 1 install of qmail and 2 smtpd configurations with each of the two smtpd's running on a different port. You can set the DATABYTES variable in each instance for the size of the e-mail that you would like to allow. A question that I don't believe has been addressed yet is how are you going to police who is connecting to each instance? Is this an environment where the different users talk to each other and one can tell the other about the "big" setting, or it this for clients who are not likely to figure out how to abuse your system and there is some flavor of auth mechanism involved?

-Raymond
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE Mail Transfer Agent hellie SUSE / openSUSE 0 10-25-2006 03:16 AM
Postfix mail transfer agent not sending mail locally or to other servers sketelsen Linux - Software 3 02-09-2006 11:16 AM
domain changed during mail transfer kryptonite0110 Linux - Networking 1 02-08-2006 07:41 AM
Why cant I transfer mail from server to client? artz Linux - Networking 10 08-09-2004 05:39 AM
Which mail agents should I use? orakio Linux - Newbie 2 03-13-2004 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration