How to forward email to a subfolder?

Discussion in 'Server Operation' started by Aldert, Jan 8, 2008.

  1. Aldert

    Aldert New Member

    Ok I've given up and don't feel happy right now :(

    I try to get mail to [email protected] to get into the inbox of [email protected]. But not only that. I want it in the subfolder of info, namely info/user2. I use postfix with maildirs, so I thought let's try to write the mail to a file:
    /home/example.com/homes/info/Maildir/.INBOX.user2/new/

    I get, using all means to prevent it:
    Jan 7 15:00:48 serv1 postfix/local[19079]: warning: maildir access problem for UID/GID=99/99: create maildir file /home/example.nl/homes/info/Maildir/.INBOX.user2/new/1199714448.P19079.serv1.example.com: Permission denied
    Jan 7 15:00:48 serv1 postfix/local[19079]: warning: perhaps you need to create the maildirs in advance

    Other option doesn't help as well:

    Jan 8 00:52:23 serv1 postfix/local[23918]: 998993EF398: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.2, delays=0.11/0.02/0/0.07, dsn=5.3.0, status=bounced (Command died with status 13: "/etc/webmin/virtual-server/filter.pl /home/aerotronic.nl/homes/filterRulesInfo ebay". Command output: Failed to open /home/example.nl/homes/info/Maildir/.INBOX.user2/new/ ; Permission denied at /etc/webmin/virtual-server/filter.pl line 77. )

    ls -la /.../

    total 8
    drwxrwxrwx 2 info.example.com example.com 4096 Jan 7 13:25 .
    drwxrwxrwx 5 info.example.com example.com 4096 Jan 7 23:51 ..

    I've tried chown -R postfix:postfix on the dir as well. Also chown -R 99:99, as I see that in the logs, the user is unknown.

    Maybe that is the problem? That user 99 in group 99??

    But then, I set the most loose permission, still permission denied to create that file with the mail contents :mad:

    TIAA (again) !
     
  2. Aldert

    Aldert New Member

    I finally did it. I didn't try to search on submailbox or so. It gave some interesting results. As I did not want to start using procmailrc as that is a kind of overkill solution to me (and will even take more time), I found a result on the recipient_delimiter parameter. I enabled it, but still no luck, it only came in the user's inbox, not in the subbox. If found the delimiter doesn't apply on aliases (only local, canonical and some more). I looked into the configuration for postfix and changed the rights of the local delivery agent (for aliases this is used appearantly, although using [email protected] did not work, as stated above) to info.example.com.

    Now I see the mail arrive into the subfolder or better, submailbox.

    I'm sure there is a better solution :)
     

Share This Page