Sponsored Content
Operating Systems Solaris oops...accidentally overwrote postfix aliases file Post 302156577 by Smiling Dragon on Tuesday 8th of January 2008 03:51:30 PM
Old 01-08-2008
Quote:
Originally Posted by JeepResQ
I have directory/dns server running sparc solaris 9.

while troubleshooting another issue, i overwrote the aliases file on accident.

my question is: is there any way to revert this?

any help super appreciated...especially since this a production box!
I'm assuiming postfix keeps it's aliases in a similar hash-style DB file as sendmail does. If so, and provided you still have this file (ie you deleted the human-readable aliases file but not the 'compiled' one postfix uses) you can run 'strings' over it to get the relevant data back out - you'll lose all your comments and formatting but the important bits will be preserved.

Hope this helps Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

oops! Style Manager

Solaris 2.6, using CDE: agh. I accidentally set an ugly palette as my Home Session. The problem is, when I change the palette back to Default, I am informed that my change will be apparent in my next session. But when I log out and in, it's still the Ugly Palette. Doesn't matter if I set the... (1 Reply)
Discussion started by: kristy
1 Replies

2. UNIX for Advanced & Expert Users

oops on mount

When ever i mount any of my 2 scsi cdroms, I get a kernel crash with the folfollowing oops kernel output. I understand that it is impossible to anwser my question WHY but could you give me some advice where i should look to debug the problem or advice me some tools to detect what might be... (3 Replies)
Discussion started by: progressdll
3 Replies

3. UNIX for Dummies Questions & Answers

HELP! Accidentally downloaded .gz file non-binary

Let me start by saying I am at a VERY beginner level in terms of UNIX/FTP/etc. Someone loaded a file onto a server for me and zipped it using gzip. I accidentally downloaded the file without using "binary". I now have a "filename.txt.gz" sitting on my computer that I need to unzip. Is... (2 Replies)
Discussion started by: UDcc123
2 Replies

4. Programming

Oops

Hi All, Can any one please differenciate between the Data Abstraction and Encapsulation? If possible, with code. Thanks in Advance, Naga:cool: (2 Replies)
Discussion started by: Nagapandi
2 Replies

5. UNIX for Dummies Questions & Answers

chmod 777 * - oops

I can belive I really did this... chmod 777 /home :eek: I have my /home directory synced to another machine. Can anyone tell me how to get the permissions from back up server /home to production server /home It's important that I dont over write the files on the... (1 Reply)
Discussion started by: shunter63
1 Replies

6. IP Networking

postfix - reinject mail to postfix from hold queue directory

hi all. Am using smtpd_recipient_restrictions & check_recipient_access in postfix. The hash file looks like this: emailaddress1 HOLD emailaddress2 HOLD The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
Discussion started by: coolatt
0 Replies

7. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

8. Shell Programming and Scripting

executing aliases from a file

hi there, i've got this alias i want assign only sometimes, and then work in the same shell with it (so when closing the shell the alias dissapears). As the alias is long, i want it to be in a executable file, so i just execute the script from a terminal and then i can access the alias from that... (4 Replies)
Discussion started by: didgewind
4 Replies

9. Emergency UNIX and Linux Support

Accidentally Changed File Ownership to Include a "Comment" [AIX]

Hi. I've had a little mishap. To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership. ... (15 Replies)
Discussion started by: Scott
15 Replies

10. UNIX and Linux Applications

Postfix: Active Directory and postfix alias

I have a mailserver with postfix i want to alias all mail for administrator@domain.fqdn to root@domain.fqdn I have the aliases configured,and i did newliases but doesn't work. How to did this?Postfix is configured for virtual domain on ad server. (2 Replies)
Discussion started by: Linusolaradm1
2 Replies
aliasadm(1M)						  System Administration Commands					      aliasadm(1M)

NAME
aliasadm - manipulate the NIS+ aliases map SYNOPSIS
aliasadm -a alias expansion [options comments] optional flags aliasadm -c alias expansion [ options comments] [ optional flags] aliasadm -d alias [ optional flags] aliasadm -e alias [ optional flags] aliasadm -l alias [ optional flags] aliasadm -m alias [ optional flags] aliasadm [-I] [-D domainname] [-f filename] [-M mapname] DESCRIPTION
aliasadm makes changes to the alias map. The alias map is an NIS+ table object with four columns: alias The name of the alias as a null terminated string. expansion The value of the alias as it would appear in a sendmail /etc/aliases file. options A list of options applicable to this alias. The only option currently supported is CANON. With this option, if the user has requested an inverse alias lookup, and there is more than one alias with this expansion, this alias is given prefer- ence. comments An arbitrary string containing comments about this alias. The sendmail(1M) command reads this map in addition to the NIS aliases map and the local /etc/aliases database. OPTIONS
-a Add an alias. -c Change an alias. -d Delete an alias. -e Edit the alias map. -I Initialize the NIS+ aliases database. -l List the alias map. -m Print or match an alias. -D domainname Edit the map in domain domainname instead of the current domain. -f filename When editing or listing the database, use filename instead of invoking the editor. -M mapname Edit mapname instead of mail_aliases. FILES
/etc/aliases mail aliases for the local host in ASCII format ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
sendmail(1M), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 12 Dec 2001 aliasadm(1M)
All times are GMT -4. The time now is 12:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy