Delete a domain mail forward.
7567
def delete(gandi, address, force):
    """"""
    source, domain = address

    if not force:
        proceed = click.confirm('Are you sure to delete the domain '
                                'mail forward %s@%s ?' % (source, domain))

        if not proceed:
            return

    result = gandi.forward.delete(domain, source)

    return result
1313449
def deleteMetadata(self, remote, address, key):
        """"""
        if self._server is not None:
            # pylint: disable=E1121
            return self._server.deleteMetadata(remote, address, key)
684087
def RemoveForwardedIp(self, address, interface):
    
    ip = netaddr.IPNetwork(address)
    self._RunIfconfig(args=[interface, '-alias', str(ip.ip)])
1017987
def delete(gandi, domain, zone_id, name, type, value):
    """"""
    if not zone_id:
        result = gandi.domain.info(domain)
        zone_id = result['zone_id']

    if not zone_id:
        gandi.echo('No zone records found, domain %s doesn\'t seems to be '
                   'managed at Gandi.' % domain)
        return
    if not name and not type and not value:
        proceed = click.confirm('This command without parameters --type, '
                                '--name or --value will remove all records'
                                ' in this zone file. Are you sur to '
                                'perform this action ?')
        if not proceed:
            return
    record = {'name': name, 'type': type, 'value': value}
    result = gandi.record.delete(zone_id, record)
    return result
614183
def _delete(self, url):
        """"""
        r = requests.delete(self._api_prefix + url,
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
842839
def clear(self):
        """"""
        super(Router, self).clear()
        for name in self.todo:
            filename = os.path.join(self.migrate_dir, name + '.py')
            os.remove(filename)
913321
def purge(gandi, email, background, force, alias):
    """"""
    login, domain = email
    if alias:
        if not force:
            proceed = click.confirm('Are you sure to purge all aliases for '
                                    'mailbox %s@%s ?' % (login, domain))
            if not proceed:
                return
        result = gandi.mail.set_alias(domain, login, [])
    else:
        if not force:
            proceed = click.confirm('Are you sure to purge mailbox %s@%s ?'
                                    % (login, domain))
            if not proceed:
                return
        result = gandi.mail.purge(domain, login, background)

    return result
1123008
def delete(config, group, force):
        """"""
        if not force:
            if not click.confirm(
                    'Confirm that you want to delete group {}'.format(group)):
                sys.exit("Deletion of {} aborted".format(group))

        client = Client()
        client.prepare_connection()
        group_api = API(client)
        group_api.delete(group)
292889
def deallocate(self):
        """"""
        if self._domain is not None:
            domain_delete(self._domain, self.logger)
        if self._hypervisor is not None:
            try:
                self._hypervisor.close()
            except Exception:
                self.logger.exception("Unable to close hypervisor connection.")
1008474
def delete_bigger(self):
        
        logger.info(
            "Deleting all mails strictly bigger than {} bytes...".format(
                self.smallest_size))
        # Select candidates for deletion.
        candidates = [
            mail for mail in self.pool
            if mail.size > self.smallest_size]
        if len(candidates) == self.size:
            logger.warning(
                "Skip deletion: all {} mails share the same size."
                "".format(self.size))
        logger.info(
            "{} candidates found for deletion.".format(len(candidates)))
        for mail in candidates:
            self.delete(mail)
719521
def delete(self):
        '''  '''
        self.down()
        fcntl.ioctl(ifconfig.sockfd, SIOCBRDELBR, self.name)
        return self
923277
def dmail_delete(self, dmail_id):
        
        return self._get('dmails/{0}.json'.format(dmail_id), method='DELETE',
                         auth=True)
1329411
public function logout()
    {
        if ($this->_mails) {
            foreach ($this->_mails as $mail) {
                if ($mail['is_deleted']) {
                    unlink($this->_path.'/'.$mail['file_name']);
                }
            }
        }
    }
1071197
def recipient_address_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/recipient_addresses/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
723497
private void doRemoveMailServer() throws PageException {
	admin.removeMailServer(getString("admin", action, "hostname"), getString("username", null));
	store();
	adminSync.broadcast(attributes, config);
    }
1259029
def update(cls, domain, source, dest_add, dest_del):
        """"""
        result = None

        if dest_add or dest_del:
            current_destinations = cls.get_destinations(domain, source)
            fwds = current_destinations[:]
            if dest_add:
                for dest in dest_add:
                    if dest not in fwds:
                        fwds.append(dest)
            if dest_del:
                for dest in dest_del:
                    if dest in fwds:
                        fwds.remove(dest)

            if ((len(current_destinations) != len(fwds))
                    or (current_destinations != fwds)):
                cls.echo('Updating mail forward %s@%s' % (source, domain))
                options = {'destinations': fwds}
                result = cls.call('domain.forward.update', domain, source,
                                  options)

        return result
68436
def cleanup_on_delete(self, sender, document, **kwargs):
        '''
        
        '''
        if not self.follow or sender is not self.owner_document:
            return
        slug = getattr(document, self.db_field)
        namespace = self.owner_document.__name__
        SlugFollow.objects(namespace=namespace, new_slug=slug).delete()