View Full Version : Help with Aliases file

02-10-2006, 02:42 PM
Hi. I've been modifying the aliases file: /etc/aliases in order to maintain a large list of email forwarding addresses. However, now I am getting a number of "missing colon" errors when I run newaliases. Also, I see that there is another aliases file: /etc/mail/aliases.

1. I'd like to know what to do to get rid of the "missing colon" errors; 2. I wonder whether I have been working with the correct file; 3. I have no earlier aliases file (san errors) to restore, so I need to figure out how to make right what I've got.

Any help on this issue would be much appreciated, as managing these aliases through the site manager is so verrrrrry sllllllllllloooooooooowwwwwwwwwwww.

Ian K

PS -- I've been ftp-ing the file to my XP system and editing it with Word, then saving it as a .txt file, and ftp-ing back.

02-10-2006, 04:15 PM
I think maybe useing Word to edit the file may be the problem. I would try using a plain text editor like Notepad or EditPlus 2 (http://www.editplus.com).

/ect/aliases is a link to /ect/mail/aliases. I would work with the acutal file when downloading and uploading which is the /ect/mail/aliases. If you grab the EditPlus 2 program from thier site you can also make sure the format of the file is unix and not PC.

02-10-2006, 06:33 PM
Thanks for the comments and the suggestion. I loaded up EditPlus 2 and found that the line numbers lined up with all the blank lines. Apparently newaliases doesn't like blanks. So I put #'s at the beginning of each blank line and all missing colon errors disappeared!

So easy once seen.

02-11-2006, 10:21 AM
I think you will like EditPlus for many things. It shows you so much more then a normal text editor and I am not really sure how I got along with out it. :) Glad that was the solution for you.

02-11-2006, 10:57 AM
Actually, Editplus was not necessary. I went back and checked it out with Word and found that using Word with line numbers turned on would also work. It's just that Editplus has a very clear display format (though I don't know why some lines were in blue and underlined and others were in black), and I had done a bit more thinking, so when I checked the error messages against the line numbers, I saw that all the lines with errors were empty. I suspect that newaliases successfully processed the original file which included the blanks, and that the errors indicated were only a warning, not an indication that the process did not work. However, nothing in the results let me know this.

Nonetheless, Editplus looks like a real nice editor and definitely piqued my interest.

02-12-2006, 11:21 AM
(though I don't know why some lines were in blue and underlined and others were in black

Once you explore the program more you will find that different file types can be highlighted in different ways. I think that default on a text file will actually try to pick up what is a url or link and treat it the same way that your browser does. In other words it turns it blue and underlines it. :)

02-12-2006, 03:49 PM
That's interesting and makes sense, since all of the underlined items would be mailtos. However, there were one or two lines, in the same format, which were not underlined. Odd. But I don't have the time to figure it out right now.