Find files that have not been accessed for a while
Wed, 06/09/2010 - 16:25 — sandipBelow one liner uses the find command to list files sorted by access time beyond the provided "number of days".
find </path/to/folder> -type f -atime +<number of days> -exec ls -ultr {} \;
This becomes handy if you want to do archive and cleanup of your web folders that have grown to a huge size.
- sandip's blog
- Login or register to post comments
sendmail access.db by example
Wed, 02/06/2008 - 00:02 — sandipThe sendmail access database file can be created to accept or reject mail from selected domains.
Since "/etc/mail/access" is a database, after creating the text file, use makemap to create the database map.
# makemap hash /etc/mail/access.db < /etc/mail/access
Below is what my access file currently looks like and can be used as a starting point. All internal addresses have been changed except for spammers!!
# by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY # Allow Connect from local server IPs Connect:207.44.206.144 OK # Accept Mail # accept mail from PayPal paypal.com OK # Reject Mail posterclub@e.allposters.c om REJECT posterclub@email.allpos ters.com REJECT plastmarket.com REJECT jr@jrtr.org REJECT 7b2.606@fe01.atl2.webus enet.com REJECT mysoldpad.com REJECT # Discard Mail 1and1-private-registratio n.com DISCARD # forum admin mails: fictionaluser@gmail.com DISCARD # Reject full mailbox fictionaluser@linuxweb log.com ERROR:4.2.2:450 mailbox full fictionaluser@linuxweblog .net REJECT # Blacklist recipients linuxweblog.net ERROR:550 That host does not accept mail # Spam friend domains: exempt domains from dnsbl list checking Spam:linuxweblog.org FRIEND # Spam friend users: exempt email users from dnsbl list checking # example: # Spam:user@domain.tld FRIEND # clients Spam:fictionalclient@h otmail.com FRIEND # Auto REJECT via hourly cron added below