apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Archives for Technology / Guides

Auditing Postfix, Adding sender BCC to monitor outgoing email

2010/10/31 by sudo Leave a Comment

copy sent mail to inbox in postfix

My scenario is this: A customer has hosted email with me, and they had a problem with one of their members of staff. They suspected he was emailing confidential information to third parties. As a result they wanted all emails inbound and outboud forwarded to one of their senior managers for review without the member of staff knowing. I run a system using postfix, so it’s quite simple to setup the inbound redirects.

Inbound Redirects (aliases) in postfix

Inbound redirects in postfix should be very straight forward. You’ll already have a /etc/postfix/virtual file.

Edit the /etc/postfix/virtual file and find the email account you want. Then change the line so has the detectives mailbox after the suspects. My file looks like the example, but depending on your setup it might be slightly different. The important thing is to leave the suspect in both places and simply add a comma followed by your detectives details in the same format.

#Emails to this address #Go to these inboxes (seporate by comma)
suspect@domain.com suspect@domain.com, detective@domain.com

Save the file, you might need to run the postfix reload command to make this work.

Inbound Redirects (aliases) in Courier MTA

Courier MTA operates in a similar way when setting up inbound redirects, so I thought I’d detail that for you too. You’ll need to edit /etc/courier/aliases/domain.com so make a backup for it first!

Edit /etc/courier/aliases/domain.com and find the line with suspect@domain.com in it. The way this file works is that it takes the email address on the left and sends it to the place on the right, in my case that’s the Maildir folder for that user

#Emails to this address #go to these folders
suspect@domain.com suspect, detective

You’ll probably need to restart the mta in order for it to recognise the new entries file.
Update: You’ll need to run makealiases to get this to work!

Outbound Auditing sender BCC in postfix

This doesn’t work on older versions. We will need to edit the /etc/postfix/main.cf file and create a /etc/postfix/sender_bcc file. As always make a backup of the files we’re editing first, incase it all goes wrong! (cp /etc/postfix/main.cf /etc/postfix/main.cf.old)

Edit the /etc/postfix/main.cf file and add the line:
sender_bcc_maps = hash:/etc/postfix/sender_bcc

Create the file /etc/postifx/sender_bcc

#emails from #BCC to
suspect@domain.com detective@domain.com

You then need to run the commands:
postmap /etc/postfix/sender_bcc
postfix reload

Filed Under: Guides, Technology Tagged With: auditing, email, Postfix

Mounting a SMB filesystem in Xubuntu & Ubuntu

2010/09/05 by sudo

Although this guide tells you how to mount SMB file systems over the network in Xubuntu, it will also work for Ubuntu and similar Debian based Linux distributions.

Fellow users of Xubuntu may have noticed that the file manager doesn’t support viewing samba shares in the same way that Ubuntu’s file manager does. This functionality used to exist, however they changed the filemanager used around 8.10. In order to view samba shares, you must therefore mount them on your system.

Mounting Samba Shares

1. Create a folder to mount your Samba share

sudo mkdir /media/music

sudo runs the command as root, mkdir tells the system to make a directory and the rest is the path you specify, I usually mount things in the /media/ directory but you can just as easily mount them in your /home/username directory.

2. Editing the fstab so it loads on boot

This file contains information on your disk partitions and you shouldn’t change anything that already exists!
sudo nano /etc/fstab

In the fstab file you will need to enter a line similar to the following:

\SAMBASERVERShareName /media/music smbfs user=username,passwd=password 0 0 

The left part indicates the server the share is hosted on, followed by where it should be mounted to in your file system, you then need to tell it that it’s a samba filesystem. If you have a username or password to view the share, enter it – if not use the line below. One word of warning – usernames and passwords stored in the file are in cleartext, it’s highly advisable that on your samba server you create a new user with limited privellages to restrict access.

\SAMBASERVERShareName /media/muisic smbfs 0 0 

save the file.

3. Run the mount command

sudo mount /media/music

this will lookup what should be mounted in the fstab file, it should then allow you to view the contents of the folder in /media/music in the Xubuntu filesystem as if it were on your local machine.

4. It didn’t work! (wrong mount type, bad option, bad superblock on…)

this means you need to run the additional command:

sudo apt-get install smbfs

This will install the samba filesystem package on your system, simply re-run the mount command when you’ve got this package and all should work!

5. It still didn’t work!

If you’re getting the error:
retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This means that your share cannot be located or cannot be logged into with the current credentials.

Try using the samba client list command:
smbclient -L ServerName

This will give you an output indicating what shares are available to connect to on the defined server. if your share isn’t found, then you’ll need to reconfigure the /etc/samba/smb.conf file on the server to enable the share you’re looking for, or use a different share name in your clients /etc/fstab file.

If your share is in that list then you need to make sure that samba references the correct directory (ie login to the server and do an ls of the directory that you’re trying to connect to to see if it exists).

Filed Under: Guides, Technology Tagged With: network shares, samba, smb, smbfs, xubuntu

7z (7zip) errors with unsupported method message

2010/08/11 by sudo

When trying to extract a .rar file with 7zip I encountered an error about an unsupported method. The directory contents of the file were listed, however it wouldn’t extract the files. After alittle reserach I discovered you required the following apparently unreleated plugin: p7zip-rar

sudo apt-get install p7z-rar

after installation, re-run your 7zip command and it will work fine

7z x filename.rar

This applies to 7-zip on Ubuntu and Debian distributions. It may also work for other distributions, however it has not been tested.

Install the full version of 7zip with the rar extensions

To install the full version of 7zip, including the p7zip-rar package to solve the unsupported method error when extracting .rar files use the following command:
sudo apt-get install p7zip-full p7zip-rar

Filed Under: Guides, Technology Tagged With: 7z, 7zip, Linux

BBC Radio using Windows Media Player (WMP)

2009/11/25 by sudo

Link updated

So you want to access the BBC Radio streams as you did in the good old days before the iplayer? Well i’ve found the links hidden away on the BBC’s website. Many a day have i been swearing that I can’t stream programmes such as click, and radio stations to my media player. I just hate the need for flash, a security hole in any system. I hate the need to have a web browser open. I hate the media interface that doesn’t work with my laptops hot-keys! For all those with similar complaints over the iPlayer go to:

UPDATED The previous link to the BBC website was found to no longer work, so this new link takes you to the correct page, as of 31st Oct 2010.
http://iplayerhelp.external.bbc.co.uk/help/playing_radio_progs/real_wma_streams

http://iplayerhelp.external.bbc.co.uk/help/streaming_programmes/real_wma_streams

Filed Under: Guides, Technology Tagged With: BBC, internet radio

  • « Previous Page
  • 1
  • …
  • 4
  • 5
  • 6

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life