Tag: relay

  • Defender TD5 Rear Wiper

    My Defender is a 1999/2000 model. So basically it is the 300Tdi with an ecu and new engine thrown in it. Land Rover rebuilt the dashboard not long after my car was made and it seems rewired it. I however, have the “awkward middle child” variant of the car.

    The rear wiper was beginning to die before the car went in for the chassis swap. It would take a full ten seconds to move across the glass. Now I have the car back, I thought I’d replace the motor as it finally died.

    Fitting a new motor is simply a case of taking off the grab handle on the rear door, removing the door skin and then undoing a few bolts. One on the bracket, the bolt holding the wiper arm to the spindle and the one holding the spindle on the door from the outside.

    The motor has two connections. One for power and earth and the other for the clever wiper park switch.

    The switch on the dash provides power to the Red/Green wire and basically turns the motor on and off. I was getting no joy even with the new motor. I checked everything and discovered the earth to both connectors was duff due to this little bullet connector behind the speaker in the rear nearside corner. A bit of sandpaper and the connector worked perfectly and my wiper swung back into life. It would not however, park.

    The electrics to handle the parking mechanism are clever but flawed. Let me explain.

    You turn the switch on and the Red/Green wire delivers power from the switch to the motor at the back of the car. When you turn the switch off, the switch instead connects the Brown/Green wire to the Red/Green wire out to the motor. This wire comes from the park switch on the motor (obviously at the back of the car). The park switch gets power from the green wire and sends it out to the Brown/Green wire only when the wiper blade is NOT parked. As soon as the blade is parked, the connection between the incoming green wire and outgoing Brown/Green wire is cut. This is a lot easier to follow with the aid of the diagram above.

    The problem here is that the power is delivered back to the switch on the dash (via the Brown/Green wire) before it returns back out to the motor. In my case, this wire is broken SOMEWHERE in the chassis. I need a different solution than rewiring the car.

    All we really need is to link the Brown/Green wire out of the park switch to the motor Red/Green connector but only when the wiper is switched off. I have an idea….

    By using a relay, we get the same result without the need for power to go all the way back to the dash switch. In fact, the complex rotary switch can be simplified into an on/off for the rear wiper and a push button for the rear wash jets. I’ll let you know how I got on…

  • Postfix Store-and-forward

    After having a little outage due my my ADSL router deciding to take a couple of hours off, I decided I really really really did need to sort out a secondary MX. I have a little Ubuntu server in a rack offsite that I toyed with for a while but never seriously did anything with once I got distracted with other things.

    Now of course it is going to be my store-and-forward server for when my home mail server disappears off the big scary Internet. A Store-and-forward server is basically a mail server that relays mail for a certain list of known domains. It will also be prepared to hold mail in the queue for a few days until the primary is back to life.

    The best description and config help I found was here. Well worth a look if you want to do this kind of thing yourself for free on old hardware for when that expensive Exchange mail server (or in my case cheap Mercury server) decides it doesn’t want to play any more.

    Postfix is currently not being too helpful and I’m going to rip-and-replace it. It should be a simple config but I couldn’t help trying to refine it. Oops. It also doesn’t help that I seem to fallen foul of the “smtp fixup” provided by the over-eager Cisco ASA sitting in front of it.

    Another good site for novice Postfix admins is here. It lists a verbose config with lots of good little security-conscious snippets.

    One way to achieve a store-and-forward server is to use Postfix aliases. An Alias file will allow your server to be the server listed as the MX in your domain zone file but then incoming mail is redirected to a server with a real mailbox. Here is an extract from my main.cf to show you how I did it:

    # Do not relay anything  
    #relay_domains = $mydestination
    #relay_recipient_maps = hash:/etc/postfix/relay_recipients
    
    # Aliases is what we want to do
    alias_maps = hash:/etc/aliases
    
    # start virtual domains section, list all the domains we receive email for and the file containing the mappings
    virtual_alias_domains = simkin.org, orangeteapot.co.uk
    virtual_alias_maps = hash:/etc/postfix/virtual
    
    # security fixes
    disable_vrfy_command = yes
    smtpd_helo_required = yes
    allow_percent_hack = no
    swap_bangpath = no
    smtpd_sasl_authenticated_header = yes
    smtpd_helo_restrictions = reject_unknown_helo_hostname
    smtpd_client_restrictions = permit_mynetworks,
                                reject_rbl_client zen.spamhaus.org,
                                reject_invalid_hostname,
                                warn_if_reject,
                                reject_unknown_reverse_client_hostname,
                                reject_non_fqdn_helo_hostname,
                                reject_unauth_pipelining,
                                reject_invalid_helo_hostname,
                                permit
    
    smtpd_recipient_restrictions = permit_mynetworks,
                                   check_client_access cidr:/etc/postfix/client_checks,
                                    permit_sasl_authenticated,
                                    reject_unauth_destination,
    
    smtpd_sender_restrictions = reject_unknown_sender_domain
    smtpd_data_restrictions = reject_unauth_pipelining
    # end security fixes
    
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +

    For the “Client Checks” section, see this post.

    Then build your alias table to pass incoming mail to a particular email address to go to wherever you want.

     nobody@simkin.org    myrealmailbox@gmail.com

    Save the file to /etc/postfix/virtual and run

    postmap virtual
    /etc/init.d/postfix reload