Re: Postfix and getmail, how to tell postfix to receive only specific adresses of a virtual domain?
Wietse, let me first thank you for your answer. A great honour for me, getting my first post answered by the inventor of postfix itself. So let me take the chance and thank you for postfix, overall :-) Your answer led me in the right direction "No mail provider domain names in ..." In fact my specific solution was pretty simple: Just deleting the virtual domains only added for my getmail-ed accounts. I even don't need virtual_alias_maps entries, as my recipient addresses (and their mailboxes) are (still) "user1@emailprovider1.example", e.g. michae...@rocketmail.com. Was my intention not to collect mails into you@really-local-domain, but within own mailboxes. Has IMHO the charm, that I can use dedicated Thunderbird (or any MUA) accounts, incoming (IMAP) pointing to my VPS, outgoing (SMTP) pointing to "real" mail provider. So thank you very much again, Michael Am 13.08.2018 um 19:50 schrieb Wietse Venema: > There is no need to list your mail provider domain names in Postfix. > That just results in unecessary 'user unknown' errors. > > Instead, use virtual_alias_maps (NOT: virtual_alias_domains) > mapping of: > > user1@emailprovider1.example you@really-local-domain > user2@emailprovider2.example you@really-local-domain > user3@emailprovider3.example other@really-local-domain > > Where only really-local-domain delivers to dovecot. > > No mail provider domain names in virtual_alias_domains. > No mail provider domain names in virtual_mailbox_domains. > No mail provider domain names in mydestination. > > You can even even reverse the virtual_alias_mapping with > smtp_generic_maps, depending on who you are sending email to. > That is a longer story. I can provide that if you are interested. > > Wietse >
Re: Postfix and getmail, how to tell postfix to receive only specific adresses of a virtual domain?
There is no need to list your mail provider domain names in Postfix. That just results in unecessary 'user unknown' errors. Instead, use virtual_alias_maps (NOT: virtual_alias_domains) mapping of: user1@emailprovider1.exampleyou@really-local-domain user2@emailprovider2.exampleyou@really-local-domain user3@emailprovider3.exampleother@really-local-domain Where only really-local-domain delivers to dovecot. No mail provider domain names in virtual_alias_domains. No mail provider domain names in virtual_mailbox_domains. No mail provider domain names in mydestination. You can even even reverse the virtual_alias_mapping with smtp_generic_maps, depending on who you are sending email to. That is a longer story. I can provide that if you are interested. Wietse
Postfix and getmail, how to tell postfix to receive only specific adresses of a virtual domain?
Postfix 3.3.0, on OpenSuse 15.0 Hi to all, my first post, as a list newbie :-) I'm using postfix, along with dovecot, for about two years now, on my VPS. virtual_mailbox_domains for virtual domains of recipients, virtual_mailbox_maps for recipient's addresses. Both stored in MariaDB/MySql. Works fine. Starting a while ago, I've added getmail, for syncing my email accounts at commercial ISPs (like the sender address of this email, michae...@rocketmail.com, a yahoo account) to my own VPS. The getmail part itself also works fine and stable. But I recognized an ugly self-made side effect today, for the first time: Let's say my VPS' domain is EXAMPLE.COM, as written above used as a postfix virtual domain. So one of my private email addresses would be mich...@example.com. To get my postfix server to accept both "direct" emails (for mich...@example.com) and "getmail-ed" emails (for michae...@rocketmail.com), I've currently added "rocketmail.com" as (postfix) "virtual domain". As said, works fine for receiving "getmail-ed" mails. BUT, today I wanted via Thunderbird to send an email from sender mich...@example.com to someone_e...@rocketmail.com. And Thunderbird immediately shows me the postfix error msg "5.1.1 / Recipient address rejected. User unknown in virtual mailbox table". So it seems that currently my postfix server, listening secured (on port 587) for relaying my emails, "remembers" that he's also listening unsecured (on port 25) to receive emails for "virtual domain" rocketmail.com. Any hints how to tell postfix that he shouldn't try to catch all emails for a virtual domain, but only the ones for existing (getmail) virtual users, defined in virtual_mailbox_maps? (Of course) I've searched the net and esp. this mailing list's archives before subscribing and posting, found this old answer https://marc.info/?l=postfix-users&m=118760792501033. Which might lead into the right direction, also for my issue, but I'm not sure. Regards, Michael
Re: Getmail
On Thu, Feb 28, 2013 at 01:14:50PM +0500, Muhammad Yousuf Khan wrote: > On Thu, Feb 28, 2013 at 3:17 AM, /dev/rob0 wrote: > > On Wed, Feb 27, 2013 at 05:51:08PM +0500, Muhammad Yousuf Khan > > wrote: > >> i am using virtual users and domains, where i have 2 virtual > >> domains and few users in both. i would like getmail to fetch > > > > First, I'll note that this is mostly off topic. Postfix has > > little to do with this, only incidentally. > > > yes, i agree but i would be thankful for every peace of help. :) That was intended as a hint that you should seek getmail help in a place which is more appropriate. I'm not going to answer your questions which are specific to getmail; I only ever spent a small amount of time in setting it up myself. The documentation was quite adequate for me. > > You have weakened the security of your virtual system by > > providing this user a real shell and having it call out to the > > Internet. Thus why I say this should be done by a system user. > > If your virtual user is compromised, all your mail might be at > > stake. If a system user is compromised, only that user's mail > > (and other files) is at risk. > > i think security will not be an issue. since i haven't published > my postfix box and our internal users are not that smart :) they > just need their emails one way or another. 1. Still, poor design, and internal users are not necessarily the only potential threat. 2. Why is an internal-only mail system using virtual mailboxes? You're adding needless complexity while removing functionality which might have been useful, as noted upthread. 3. Why is Postfix involved at all? All you really need is getmail and your local imapd. The MTA might be slightly useful for internal users sending mail to other internal users, but they can use their ISP mail for that as well, submitting directly to the ISP. -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Re: Getmail
On Thu, Feb 28, 2013 at 3:17 AM, /dev/rob0 wrote: > On Wed, Feb 27, 2013 at 05:51:08PM +0500, Muhammad Yousuf Khan wrote: >> i am using virtual users and domains, where i have 2 virtual domains >> and few users in both. i would like getmail to fetch email via pop3 > > First, I'll note that this is mostly off topic. Postfix has little to > do with this, only incidentally. > yes, i agree but i would be thankful for every peace of help. :) > > You'll have to run getmail as the system user/group who owns the > mailbox. The Postfix settings which might apply are virtual_uid_maps > and virtual_gid_maps. This user (or users, as the case may be) must > have a valid shell (which you generally would not want in the case of > virtual delivery.) our users are not that good in Linux they can not manage this file by them selves i think i have to define all users in one file if possible and manage it by user Root. > > It looks like you made a $HOME for your virtual users; that's good. > You can keep your files in /maildb/vmail/$domain/$user/.getmail, or > perhaps even in /maildb/vmail/.getmail if it's all one user, as it is > in almost every case. You can make a cron job for the user[s] to > getmail. Refer to the examples as provided by Robert. actually i want to define all users in one file. by user root and by cron job i will fetch all the messages. is it possible defining all the users and their destination in /maildb/vmail/.getmail as shared by you. sorry for my newbie question i am very new with getmail so before getting involve with it i am trying to make a good ground. > > You have weakened the security of your virtual system by providing > this user a real shell and having it call out to the Internet. Thus > why I say this should be done by a system user. If your virtual user > is compromised, all your mail might be at stake. If a system user is > compromised, only that user's mail (and other files) is at risk. i think security will not be an issue. since i haven't published my postfix box and our internal users are not that smart :) they just need their emails one way or another. Thanks > -- > http://rob0.nodns4.us/ -- system administration and consulting > Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Re: Getmail
On Wed, Feb 27, 2013 at 05:51:08PM +0500, Muhammad Yousuf Khan wrote: > i am using virtual users and domains, where i have 2 virtual domains > and few users in both. i would like getmail to fetch email via pop3 First, I'll note that this is mostly off topic. Postfix has little to do with this, only incidentally. Second, why are you using POP3? Surely your provider offers IMAP? If not, it's a good sign that you need a different provider. :) Third, this would have been better with system users rather than virtual(8). > from our hosting servers and copy it directly to our Maildir Base, > here is the path of my virtual users mailbox base. > > /maildb/vmail/$domain/$user/Maildir > > is there anyone can guide me with the getmail settings. You'll have to run getmail as the system user/group who owns the mailbox. The Postfix settings which might apply are virtual_uid_maps and virtual_gid_maps. This user (or users, as the case may be) must have a valid shell (which you generally would not want in the case of virtual delivery.) It looks like you made a $HOME for your virtual users; that's good. You can keep your files in /maildb/vmail/$domain/$user/.getmail, or perhaps even in /maildb/vmail/.getmail if it's all one user, as it is in almost every case. You can make a cron job for the user[s] to getmail. Refer to the examples as provided by Robert. You have weakened the security of your virtual system by providing this user a real shell and having it call out to the Internet. Thus why I say this should be done by a system user. If your virtual user is compromised, all your mail might be at stake. If a system user is compromised, only that user's mail (and other files) is at risk. -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Re: Getmail
Am 27.02.2013 13:51, schrieb Muhammad Yousuf Khan: > i am using virtual users and domains, where i have 2 virtual domains > and few users in both. i would like getmail to fetch email via pop3 > from our hosting servers and copy it directly to our Maildir Base, > here is the path of my virtual users mailbox base. > > /maildb/vmail/$domain/$user/Maildir > > is there anyone can guide me with the getmail settings. > > Thanks, > > MYK > http://pyropus.ca/software/getmail/getmailrc-examples Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Getmail
i am using virtual users and domains, where i have 2 virtual domains and few users in both. i would like getmail to fetch email via pop3 from our hosting servers and copy it directly to our Maildir Base, here is the path of my virtual users mailbox base. /maildb/vmail/$domain/$user/Maildir is there anyone can guide me with the getmail settings. Thanks, MYK