2

I am using /etc/aliases to direct group emails to multiple accounts, for example:

postmaster: john
abuse: john
www: paul
team: john, paul, ringo, george

One of the lines is getting quite long due to the number of users it forwards to. Is it possible to wrap the line?

I am using Exim as the MTA.

1

1 Answer 1

3

Edit: My original answer was that it is not possible, but after a very helpful comment from @Freddy it might work:

Doing a quick test on a Debian 11 system:

~# cat /etc/aliases 
testgroup: test1, 
 test2,
 test3

~# newaliases
~# sendmail testgroup
testmail4
^d

~# su test3
~$ mail
"/var/mail/test3": 2 messages 2 new
>N   1 root               Wed Feb  1 13:22  12/421   
 N   2 root               Wed Feb  1 13:25  12/421   
? 2
Return-path: <root@4d79c2bfcbb5>
Envelope-to: testgroup@4d79c2bfcbb5
Delivery-date: Wed, 01 Feb 2023 13:25:05 +0000
Received: from root by 4d79c2bfcbb5 with local (Exim 4.94.2)
    (envelope-from <root@4d79c2bfcbb5>)
    id 1pND6m-0000xM-2Y
    for testgroup@4d79c2bfcbb5; Wed, 01 Feb 2023 13:25:04 +0000
Message-Id: <E1pND6m-0000xM-2Y@4d79c2bfcbb5>
From: root <root@4d79c2bfcbb5>
Date: Wed, 01 Feb 2023 13:25:04 +0000

testmail4
? 


So it is possible to wrap the line, but the line should start with a white space. (A tab worked also for me)

2
  • 2
    Have you tried to indent the next line with whitespace? From aliases (postfix): A logical line starts with non-whitespace text. A line that starts with whitespace continues a logical line. But I don't know if that works on current Exim versions. From Exim spec 3.20: The items in the list are separated by commas. The list can be continued over several lines by starting each of the continuation lines with white space.
    – Freddy
    Feb 1, 2023 at 12:58
  • @Freddy This works (with Exim)! If you put it as an answer I'll mark it as correct. Thanks both!
    – Tim Styles
    Feb 1, 2023 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .