Solved: Sendmail question. Problem with yahoo.
Coleman Kane
cokane at cokane.org
Mon Apr 14 09:44:40 EDT 2008
On Sun, 2008-04-13 at 18:23 -0400, Shawn O'Shea wrote:
>
>
> On Sun, Apr 13, 2008 at 8:13 AM, Ben Scott <dragonhawk at gmail.com>
> wrote:
> On Sat, Apr 12, 2008 at 3:24 PM, Coleman Kane
> <cokane at cokane.org> wrote:
> > A more helpful suggestion is that you may want to set the
>
> > default_destination_recipient_limit
> in /etc/postfix/main.cf ... to 5.
>
> I don't know much of anything about Postfix, but I'm guessing
> that
> will impact all destination MXes. The goal here was to just
> limit
> connections to *Yahoo* to 5 recipients per envelope. The
> above will
> penalize all connections, right? How would one specify that
> for just
> Yahoo?
> I don't have a ton of Postfix experience, but using this Postfix FAQ
> question ( http://www.postfix.org/faq.html#incoming ) as a template of
> sorts (and reading bits from the O'Reilly postfix book and the postfix
> man pages.
>
> You would create a transport map file, say /etc/postfix/transport. Add
> entries for the domains you want to limit and assign them to a
> transport name, let's say lamdomains
>
> yahoo.com lamedomains:
>
> You need to then run: postmap /etc/postfix/transport
>
> Then in the postfix main.cf, add lines to tell it about the transport
> and to tell it that anything in that transport has the recipient
> limit.
> transport_maps = hash:/etc/postfix/transport
> lamedomains_destination_recipient_limit = 5
>
> So now you've created a transport, put some domains in it, changed the
> default behavior of postfix for that transport, you just need to tell
> postfix what to do with that transport (aka, deliver it with smtp).
>
> Add a line to master.cf:
> lamedomains unix - - - - - smtp
>
> Now tell postfix to reload it's config: postfix reload
OMG you're my hero. New stuff learned every day.
>
> Again, I haven't tested this, so you mean need to read man pages and
> play with that a little, but that should set a postfix user in the
> right direction
>
> -Shawn
Thanks for that little tidbit, that will be very helpful in the future.
I'd like to also point out another feature of Postfix that some of you
might also not be familiar with.
Notice the "hash:" above in the
"transport_maps = hash:/etc/postfix/transport" line. If you compile
Postfix with the -DHAS_MYSQL option, then you can replace this with
"mysql:" and the filename after the ":" is the location of a
specially-formatted .cf file that tells postfix to connect to a mysql
table and where to get the information that it wants.
Postfix uses a database-abstraction model for maintaining most of these
"mappings" in the system. Pretty much any configuration option that
accepts such a parameter can be turned into a MySQL table. This greatly
increases your ability to perform dynamic run-time configuration changes
at will (without restarting postfix).
I believe that PostgreSQL support also exists as well, for those of you
who are that way inclined.
--
Coleman Kane
More information about the gnhlug-discuss
mailing list